This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
In the versioning manager, I have added few projects of type web, ejb and java. When I go to web and ejb type projects the versioning menu shows up for me to do cvs operations at the project level. The same options dont show up for the plain java projects.
True. This was not implemented for Java projects, because there can be external source roots and there would have to be some projects - VCS integration to get the list of files to act on. Web projects can also have several various source roots, therefore the VCS actions will likely not work correctly there. So it needs to be discussed with web team whether the VCS actions should be removed from the project node. Moving to web to sort that out.
I created a Java project, a Web project and an EJB project under a cvs-ed folder. I see CVS action on all project roots in Files explorer tab and on none of them in Projects tab. I guess I am missing your point. Can you clarify what menu exactly you are talking about? Thanks.
Aha, I've identified the problem. This is about Versioning menu, not the contextual menu. The contextual menu *is* consistent, but the Versioning menu is not. The problem is caused by the fact that Java project node does not have a corresponding FileObject in the lookup. But Web project node does. The action in Versioning menu takes the files to act on from FileObjects it finds in the lookup of the selected nodes. So this is causing the difference. I guess this was made for some reason and it's silly to request to remove the FileObject from lookup of Web project node. Thus I'm moving this back to VCS, I have to assure that the Versioning menu (the contextual part) will be only on nodes that have FileSystemAction. This will assure the consistency.
Uff, now I see that it's not so easy. When I add a check for FileSystemAction, it removes the menu from Editor, which is not good! The fix will likely be a pure hack - check for FileSystemAction only in case of folders... The same problem concerns VCS toolbar.
Fixed in trunk: /cvs/vcscore/src/org/netbeans/modules/vcscore/VcsFSCommandsAction.java,v <-- VcsFSCommandsAction.java new revision: 1.20; previous revision: 1.19 /cvs/vcscore/src/org/netbeans/modules/vcscore/actions/GeneralCommandAction.java,v <-- GeneralCommandAction.java new revision: 1.26; previous revision: 1.25 /cvs/vcscore/src/org/netbeans/modules/vcscore/actions/VcsAllCommandsAction.java,v <-- VcsAllCommandsAction.java new revision: 1.16; previous revision: 1.15
Created attachment 21361 [details] The textual diff
Created attachment 21362 [details] Oops, vi has wrapped it, here is a corrected version.
I don't like this hack much, it does not address the real problem. Perhaps the proper solution is that POJO projects *should* have the project directory in their lookup if they do not have any external source roots. Or, a project with external source roots should have multiple instances of FileObject in its lookup, corresponding to Sources.GENERIC roots, and vcscore should know enough to check for >1 FO in lookup. Or, the FO should be *removed* from the lookup of every project node and vcscore should look for a Sources object and check GENERIC source groups.
Reviewed. We are late in release cycle justifing the hacky solution.
I like the Jesse's idea, however, I do not think we can force other modules to have FileObjects in their lookup iff they want to have VCS actions associated. Ideally, that could be solved by some cookie, but that will definitely take some time to implement. As we need some quick and robust solution, IMHO taking the presence of FileSystemAction as a "cookie" works fine for this purpose.
It's good enough for 4.1 I think.
O.K. Thanks. Fixed in release41 branch: /cvs/vcscore/src/org/netbeans/modules/vcscore/actions/GeneralCommandAction.java,v <-- GeneralCommandAction.java new revision: 1.25.32.1; previous revision: 1.25 /cvs/vcscore/src/org/netbeans/modules/vcscore/actions/VcsAllCommandsAction.java,v <-- VcsAllCommandsAction.java new revision: 1.15.6.1; previous revision: 1.15 /cvs/vcscore/src/org/netbeans/modules/vcscore/VcsFSCommandsAction.java,v <-- VcsFSCommandsAction.java new revision: 1.19.6.1; previous revision: 1.19
Can you verify this issue, please?
Verified.