subclipse 未在 Eclipse 的项目上下文菜单上显示“共享项目”选项
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3767144/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
subclipse not showing "share project" option on project context menu in eclipse
提问by P0rridge
Within eclipse, with Subclipse installed, if I right click a project and select "team" there are normally 2 options:
在 Eclipse 中,安装 Subclipse 后,如果我右键单击一个项目并选择“团队”,通常有两个选项:
- apply patch
- share project
- 应用补丁
- 共享项目
Once you have shared project you get the full Subclipse menu from "team"
共享项目后,您会从“团队”获得完整的 Subclipse 菜单
One project however only has one option - apply patch. If I close the project I see both options but the share project option is grayed out.
然而,一个项目只有一种选择——应用补丁。如果我关闭项目,我会看到两个选项,但共享项目选项变灰。
I have other projects where this is not happening.
我还有其他项目没有发生这种情况。
What could be special about this project to stop me getting the share project option? Is there another path to the share project function I could use?
这个项目有什么特别之处可以阻止我获得共享项目选项?我可以使用共享项目功能的另一条路径吗?
Regards
问候
回答by rcmadruga
Solve this problem with these steps:
通过以下步骤解决此问题:
- Verify that you can update using TortoiseSVN (this will guarantee that your .svn is not corrupt)
- Delete all your projects that have this problem, but in the delete dialog, do not delete the project contents!
- Select File -> Import -> Existing projects into Workspace.
- Select your projects folder or your workspace folder.
- 验证您是否可以使用 TortoiseSVN 进行更新(这将保证您的 .svn 没有损坏)
- 删除所有有此问题的项目,但在删除对话框中,不要删除项目内容!
- 选择 File -> Import -> Existing projects into Workspace。
- 选择您的项目文件夹或工作区文件夹。
Subeclipse should now detect and connect your projects automatically, without need to select 'Share Project' for each one of them.
Subeclipse 现在应该自动检测并连接您的项目,无需为每个项目选择“共享项目”。
回答by VonC
This is usually the case when the directory containing the project is not properly under version control (bad or corrupted .svn
).
当包含项目的目录不受版本控制(坏或损坏.svn
)时,通常会出现这种情况。
So:
所以:
- can you execute SVN commands in a shell a the root of your project?
- where are your
.project
and.classpath
files (in the eclipse workspace or at the root directory of your project?)
- 你能在你的项目根目录下的 shell 中执行 SVN 命令吗?
- 您的
.project
和.classpath
文件在哪里(在 eclipse 工作区或项目的根目录中?)
回答by Yaniv
If you upgraded your Eclipse recently, make sure you're still using the same SVN plugins... :)
如果您最近升级了 Eclipse,请确保您仍在使用相同的 SVN 插件... :)
In my case, I upgraded my Eclipse and accidentally installed Subversive instead of Subclipse. The existing .svn directory of the project contained data in the format expected by Subclipse, and so Subversive got confused (e.g. but not showing the "Share Project" option).
就我而言,我升级了 Eclipse 并意外安装了 Subversive 而不是 Subclipse。项目现有的 .svn 目录包含 Subclipse 预期格式的数据,因此 Subversive 感到困惑(例如,但未显示“共享项目”选项)。
回答by bilen
Close Project and Re-Open project has worked for me.
关闭项目和重新打开项目对我有用。
回答by Gregor
I have the same problem after emergency-migrating (again!) from Subversive to Subclipse. Old .svn entries are all there but Subclipse won't pick them up.
从 Subversive 紧急迁移(再次!)到 Subclipse 后,我遇到了同样的问题。旧的 .svn 条目都在那里,但 Subclipse 不会选择它们。
I can successfully commit using an external tool, in this case TortoiseSVN, but in Eclipse, I just see normal Java projects that cannot be shared (because of stale .svn entries I suspect).
我可以使用外部工具成功提交,在这种情况下是 TortoiseSVN,但在 Eclipse 中,我只看到无法共享的普通 Java 项目(因为我怀疑是陈旧的 .svn 条目)。
The only solution I see is to commit everything you want to keep with an external tool, then freshly check out your projects into a new workspace and copy over any missing pieces from your old workspace.
我看到的唯一解决方案是使用外部工具提交您想要保留的所有内容,然后将您的项目重新检出到新工作区并复制旧工作区中任何缺失的部分。
回答by Sahil Kaushal
Try to select prespective as java instead of j2ee and then restart as eclipse .
尝试选择 preferive 作为 java 而不是 j2ee ,然后作为 eclipse 重新启动。
This works for me.
这对我有用。
回答by dankilev
Please double check if you were using: Subversiveor Subclipse?
请仔细检查您是否在使用:Subversive或Subclipse?
It is likely that you have opened an old project with a newer Eclipse installation, where the software to be used may not be the one used previously, for example:
很可能你用较新的 Eclipse 安装打开了一个旧项目,其中要使用的软件可能不是以前使用的软件,例如:
- Subclipse instead of Subversive
- Subversive instead of Subclipse
- Subclipse 而不是 Subversive
- 颠覆而不是 Subclipse
In my case after a fresh install of "Eclipse IDE for PHP Developers" Version: 2018-09 (4.9.0) Build id: 20180917-1800 while I needed to make some modifications to an ancient SVN tracked project.
就我而言,在全新安装“Eclipse IDE for PHP Developers”版本:2018-09 (4.9.0) 构建 ID:20180917-1800 后,我需要对古老的 SVN 跟踪项目进行一些修改。
I had Subclipse instead of Subversive (so simple yet you may be up for a spin).
Credit to the answer from Yaniv, he had installed the software the other way around - same issue.
我用的是 Subclipse 而不是 Subversive(如此简单,但您可能想试一试)。
感谢 Yaniv 的回答,他以相反的方式安装了软件 - 同样的问题。
回答by Renzo Filini
Delete the file:
删除文件:
<ECLIPSE_WS>\.metadata\.plugins\org.eclipse.core.resources\.projects\<PROJECT_NAME>\.indexes\properties.index
<ECLIPSE_WS>\.metadata\.plugins\org.eclipse.core.resources\.projects\<PROJECT_NAME>\.indexes\properties.index
And the Share Project option appears!
并且出现共享项目选项!
回答by Jeongho
I had the exactly same situation with Yaniv above.
我和上面的 Yaniv 遇到了完全相同的情况。
If you upgraded your Eclipse recently, make sure you're still using the same SVN plugins... :)
In my case, I upgraded my Eclipse and accidentally installed Subversive instead of Subclipse. The existing .svn directory of the project contained data in the format expected by Subclipse, and so Subversive got confused (e.g. but not showing the "Share Project" option).
如果您最近升级了 Eclipse,请确保您仍在使用相同的 SVN 插件... :)
就我而言,我升级了 Eclipse 并意外安装了 Subversive 而不是 Subclipse。项目现有的 .svn 目录包含 Subclipse 预期格式的数据,因此 Subversive 感到困惑(例如,但未显示“共享项目”选项)。
My solution is like below:
我的解决方案如下:
Exported the current project in the new workspace into .war file.
Double-checked the current project is in the svn repository.
Removed the project in the new workspace completely once I was sure that I have the exported .war file and svn repository so that I will be able to import the project again.
Imported the project from svn, and checked out the project from the svn. (Or, you can import the project from the .war file and you will be able to Share Project)
将新工作区中的当前项目导出为 .war 文件。
仔细检查当前项目是否在 svn 存储库中。
一旦我确定我有导出的 .war 文件和 svn 存储库,就完全删除了新工作区中的项目,以便我能够再次导入项目。
从svn导入项目,从svn检出项目。(或者,您可以从 .war 文件导入项目,您将能够共享项目)
-> It worked well with the Subversive which is installed in the new workspace.
-> 它与安装在新工作区中的 Subversive 配合得很好。