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.
If I enable the subversion plugin the 'call hierarchy' and 'refactor' functionality is disabled. (menuchoices are grayed out) If I then disable subversion plugin both the functionalities work. I'm using netbeans 6.8 rc2. Let me know if I can should activate some logging to solve this problem.
Correction: 'refactor' is not grayed out but it doesn't work! If I try to rename a method I get the error: "The Rename refactoring cannot be applied in this context"
I just tried 6.8rc2 and it works perfectly in the editor. Are you sure you're using the refactoring in the full editor and not e.g. in the subversion diff view (please make a screenshot of the IDE)?
Sorry, but I seem to be unable to create a screenshot. But I'm sure that i'm in the editor. I don't even use the subversion diff. (I only use the annotations functionality)
I saw in the logging that it fallsback on the commandline svn. I use "svn, version 1.6.5 (r38866)" on ubuntu. Subversion works OK because annotations work. Is there a logger I could activate?
I can't reproduce and subversion does not call or directly interact with refactoring. The message about fallback to commandline is irrelevant. Reassigning to java/refactoring for evaluation... Do you have some logger that can be enabled?
hmmm, bug is also present (for me) in netbeans 6.8
What project type do you use (java application, free-form)? What exactly are you renaming (class, field, method, ...)? Is the file declaring the renamed element on the source path? Please attach your ${nb.user.dir}/var/log/messages.log.* here. To enable logging use -J-Dorg.netbeans.modules.refactoring.api.impl.ActionsImplementationFactory.level=FINE in ${nb.install.dir}/etc/netbeans.conf or cmd line.
Created attachment 92699 [details] Refactoring disabled after activating subversion plugin
The attachment message.log shows the starting netbeans. - I start netbeans. - The editor opens up with the last file I was editing. - Immediately I try to refactor and rename a method. - I get the refactor popup. (In the logging I see "... canRename: ... true") - I close the refactor popup. - In the logging I see "Finished indexing svn cache with 439 entries" - I try to refactor and rename the SAME method. - I get an error message that I cannot refactor. (In the logging I see "... canRename: ... false") !!
Created attachment 92700 [details] Refactoring disabled after activating subversion plugin
Please ignore the first attachment "Refactoring disabled after activating subversion plugin". This log also shows the problem but then I had the jvi plugin activated. The second log shows the problem WITHOUT the jvi plugin.
Here is a different situation: - I start netbeans. - Netbeans start scanning the project. - During scanning I try to refactor "rename". - After scanning is ready I get a warning/error popup which says: "Cannot refactor /usr/local..../JPAUtil.java this is defined outside of an open project" So it seems that netbeans thinks the file is 'outside' of an project. While it is 'inside' the project before enabling the subversion plugin.
Nothing points it somehow relates to svn or jvi plugins for now. What project type do you use (java application, free-form)? Unfortunately the messages.log does not contain anything what would unveil what is going wrong. Please enable also following loggers and attach the log again here. org.netbeans.api.project.FileOwnerQuery.level=FINE org.netbeans.api.java.classpath.ClassPath.level=FINE Ad "Cannot refactor /usr/local..../JPAUtil.java ..." warning. The message means that the file is not part of any __open__ project. Can you confirm it? When you invoke Ctrl+Shift+1 (Select in project) action inside JPAUtil.java editor does it select the open project?
Thanks! Ctrl+Shift+1 is the key to the problem! I got refactoring working again. What I did is: - Edit "JPAUtil.java" - Invoke Ctrl+Shift+1 A SECOND project "Standard" is opened. I now see in the project-tab 2 projects with the same name. (Is this a bug?) - I close the first project. - I can refactor in the second project.
I guess it is valid to have 2 projects with same name. They should be located in different folders. Move mouse over project nodes to see the project path. Closing as fixed. If you have a reproducible test case how to get the IDE to above described state using subversion or whatever else feel free to reopen it.
I don't have 2 projects! I have 1 project named "Standard" But I now know what the 'bug' is! I have hovered over the 2 projects and I see 2 different paths: - /usr/local/kees/projecten/Standard/current/netbeans - /projecten/Standard/current/netbeans. But "/usr/local/kees/projecten/Standard" is a softlink (ln -s) to "/projecten/Standard". So on disk it is the same location! It's just a guess but I think netbeans compares the 'path' of a Files. It should (?) compare the 'canonicalpath' of the Files.
It is a question to projects and filesystem maintainers. Reassigning to evaluate.
User error; should pick one way to refer to the file tree and stick with it. Tread carefully here. *Comparing* canonical paths is OK in certain circumstances - for example, issuing a warning if a path is encountered which seems to be a canonical variant of a path stored from some other context. *Storing* canonical paths is never OK, since there may be a good reason to refer to paths with symlink segments (e.g. ~/src expanding to /media/01234567-89ab-cdef-0123-456789abcdef/src). (FileUtil.normalizeFile can and should be applied to any incoming paths, as this does not attempt to traverse symlinks.)
> User error; should pick one way to refer to the file tree and stick with it. I'm not sure what you mean by this. Are you saying I made an error configuring my project? How can I prevent this error? Did you read the complete thread? because this error only occurs when the subversion plugin is activated!
I think I now now what I'm doing wrong. (By the way: my previous workaround doesn't work!) I have created the project with the path "/usr/local/kees/projecten/Standard/current/netbeans". I have opened the project with the symlink "/projecten/Standard/current/netbeans".
(In reply to comment #20) > I think I now now what I'm doing wrong. > (By the way: my previous workaround doesn't work!) > > I have created the project with the path > "/usr/local/kees/projecten/Standard/current/netbeans". > I have opened the project with the symlink > "/projecten/Standard/current/netbeans". So the workaround is: - Open the project with the same path as when you created the project. (Would be nice though that this wasn't necessary) Thanks all!
(In reply to comment #21) > So the workaround is: > Open the project with the same path as when you created the project. Right. > Would be nice though that this wasn't necessary Or that the IDE would at least give a clear indication of what you need to do differently.
Change of default owner.
*** Bug 182775 has been marked as a duplicate of this bug. ***
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss