Can't refactor rename in Eclipse
If I do a refactor rename on something, it tries to do it for a moment but then just reverts it right back to what it was named before. No errors or any indication that something is wrong is shown.
I just restarted Eclipse and now it's even worse. Before, at least selecting Refactor > Rename would "box" the name and pretend it's letting you do a refactor. Now, after restart, selecting Refactor > Rename does nothing.
Win7 64 bit
Eclipse Indigo build 20110615-0604
java eclipse refactoring rename
add a comment |
If I do a refactor rename on something, it tries to do it for a moment but then just reverts it right back to what it was named before. No errors or any indication that something is wrong is shown.
I just restarted Eclipse and now it's even worse. Before, at least selecting Refactor > Rename would "box" the name and pretend it's letting you do a refactor. Now, after restart, selecting Refactor > Rename does nothing.
Win7 64 bit
Eclipse Indigo build 20110615-0604
java eclipse refactoring rename
1
What view are you in? What are you renaming, and to what? You only have to give more information if you actually expect some help...
– arcy
Jul 8 '12 at 0:53
1
Also verify if the project has any compile error. Sometime with compile errors it does not let you refactor things.
– vikas
Jul 8 '12 at 12:20
1
This happened to me when attempting rename on a Javascript method. JSDT is installed. Removing and adding project did not help.
– Nilzor
Dec 12 '13 at 21:09
add a comment |
If I do a refactor rename on something, it tries to do it for a moment but then just reverts it right back to what it was named before. No errors or any indication that something is wrong is shown.
I just restarted Eclipse and now it's even worse. Before, at least selecting Refactor > Rename would "box" the name and pretend it's letting you do a refactor. Now, after restart, selecting Refactor > Rename does nothing.
Win7 64 bit
Eclipse Indigo build 20110615-0604
java eclipse refactoring rename
If I do a refactor rename on something, it tries to do it for a moment but then just reverts it right back to what it was named before. No errors or any indication that something is wrong is shown.
I just restarted Eclipse and now it's even worse. Before, at least selecting Refactor > Rename would "box" the name and pretend it's letting you do a refactor. Now, after restart, selecting Refactor > Rename does nothing.
Win7 64 bit
Eclipse Indigo build 20110615-0604
java eclipse refactoring rename
java eclipse refactoring rename
edited Jun 5 '18 at 12:05
Lii
7,24644163
7,24644163
asked Jul 8 '12 at 0:37
Mike DannyboyMike Dannyboy
1031110
1031110
1
What view are you in? What are you renaming, and to what? You only have to give more information if you actually expect some help...
– arcy
Jul 8 '12 at 0:53
1
Also verify if the project has any compile error. Sometime with compile errors it does not let you refactor things.
– vikas
Jul 8 '12 at 12:20
1
This happened to me when attempting rename on a Javascript method. JSDT is installed. Removing and adding project did not help.
– Nilzor
Dec 12 '13 at 21:09
add a comment |
1
What view are you in? What are you renaming, and to what? You only have to give more information if you actually expect some help...
– arcy
Jul 8 '12 at 0:53
1
Also verify if the project has any compile error. Sometime with compile errors it does not let you refactor things.
– vikas
Jul 8 '12 at 12:20
1
This happened to me when attempting rename on a Javascript method. JSDT is installed. Removing and adding project did not help.
– Nilzor
Dec 12 '13 at 21:09
1
1
What view are you in? What are you renaming, and to what? You only have to give more information if you actually expect some help...
– arcy
Jul 8 '12 at 0:53
What view are you in? What are you renaming, and to what? You only have to give more information if you actually expect some help...
– arcy
Jul 8 '12 at 0:53
1
1
Also verify if the project has any compile error. Sometime with compile errors it does not let you refactor things.
– vikas
Jul 8 '12 at 12:20
Also verify if the project has any compile error. Sometime with compile errors it does not let you refactor things.
– vikas
Jul 8 '12 at 12:20
1
1
This happened to me when attempting rename on a Javascript method. JSDT is installed. Removing and adding project did not help.
– Nilzor
Dec 12 '13 at 21:09
This happened to me when attempting rename on a Javascript method. JSDT is installed. Removing and adding project did not help.
– Nilzor
Dec 12 '13 at 21:09
add a comment |
12 Answers
12
active
oldest
votes
Try to delete the project from Eclipse (don't delete project contents on disk) and then reload it.
add a comment |
I wanted to add some information to some other answers here.
Archenoth's answer points out you can get more information from running Preview on the rename operation. It took me a while to figure out how to get to preview: type the rename keystroke a second time to get the dialog. Sometimes Preview didn't give the error information (and neither did the quick rename without the ppoup) but clicking OK in the dialog did say more.
MutantXenu found information in the logs by going into files in the workspace, but you can also get to these within Eclipse by going to the Error Log view (from Cmd-3)
When I had this problem, the error log pointed me to this failed assertion: "Search for method declaration did not find original element" which led to some unresolved bugs. (I'm running Kepler, but the problem is apparently hard to replicate and I don't see evidence it's resolved. See here and here.)
You can see if you're experiencing this specific bug by selecting the method and using Cmd-G (or Ctrl-G: Search > Declarations > Workspace). Eclipse is unable to find the method you're trying to rename and the search comes up empty.
My case suggests it's possible the error might have to do with identically-named methods in different classes. When the problem is occuring with one method, it doesn't affect most others.
Refresh, Project->Clean, and restarting Eclipse were not helpful to me.
Kevin's answer worked for me: "Try to delete the project from Eclipse (don't delete project contents on disk) and then reload it."
add a comment |
While renaming methods directly in the editor does not work in very rare cases and then the IDE restores the orignal method name after pressing return key - kind of "agnostic mode" :-), when I do the same via Refactoring -> Change Methode Signature, in the upper right corner I change the method name, then I receive a fully detailed error message: "An unexpected exception occured while performing the refactoring... Reason: anonymous #1 in .... in lambda #1 ... in ... Working Copy ... does not exist."
This indicates, that renaming methods triggers this failure, when the method to be renamed is used in the context of an lambda or anonymous class.
To check, comment out the occurence in the lambda or anonymous class, the refactoring/renaming could then work as expected as it did in my case.
add a comment |
I had this problem with Eclipse Helios. I looked in the .metadata directory of the workspace and opened the .log file. It had a pretty long chain of references relating to the error, but the pertinent parts of that were:
java.lang.NoClassDefFoundError: org/eclipse/jdt/core/IMethod
and
java.lang.reflect.InvocationTargetException at
org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
at
org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
at
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
at
org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2606)
at
org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:191)
at
org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:151)
at
org.eclipse.jdt.ui.refactoring.RenameSupport.perform(RenameSupport.java:197)
at
org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode.doRename(RenameLinkedMode.java:361)
at
org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode$EditorSynchronizer.left(RenameLinkedMode.java:119)
at
org.eclipse.jface.text.link.LinkedModeModel.exit(LinkedModeModel.java:341)
at
org.eclipse.jface.text.link.LinkedModeUI$4.run(LinkedModeUI.java:1194)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
I went to Help > Install New Software > What is already installed, and then selected everything relating to org.eclipse.swt and clicked on Uninstall. After restarting Eclipse, the problem went away and I was able to refactor / rename normally again.
Same here with Kepler
– leonbloy
Sep 23 '13 at 20:09
add a comment |
The refactor will not work if there are any errors in your project.
Fix the errors, or just comment out the section being detected as an error in order to run the refactor.
This worked for me.
add a comment |
I've been struggling this issue too. When I looked on Error Log View of Eclipse, I noticed that each time I tried to rename a variable or method, I was getting this kind of exception:
java.lang.reflect.InvocationTargetException at
org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421) at
org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759) at
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756) at
org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2606) at
org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:191) at
org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:151) at
org.eclipse.jdt.ui.refactoring.RenameSupport.perform(RenameSupport.java:197) at
org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode.doRename(RenameLinkedMode.java:361) at
org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode$EditorSynchronizer.left(RenameLinkedMode.java:119) at
org.eclipse.jface.text.link.LinkedModeModel.exit(LinkedModeModel.java:341) at
org.eclipse.jface.text.link.LinkedModeUI$4.run(LinkedModeUI.java:1194) at
org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041) at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
I noticed it all starts from SWT libraries. Tried to update SWT, but for some reasons I wasn't able even to find SWT installed.
So I simply installed SWT Tools 3.106.0.v20170503-0851 via Help -> Install new Software, what happily solved the issue.
Welcome to StackOverflow! It's not clear to me that your answer matches the question that was asked. If it does, could you please make the connection more explicit? Thank you.
– Ellen Spertus
Apr 1 '18 at 20:44
You can get the site-url to use in Help > Install_New_Software from here: eclipse.org/swt/updatesite.php - I used the milestone-update-site: download.eclipse.org/eclipse/updates/milestones
– Curtis Yallop
Mar 1 at 18:54
@EllenSpertus It does match the question and solved the problem for me. This stack trace comes from the error-log window in eclipse. When using change-signature or the Refactor>Rename,click-Options, it reports the error and tells you to look at the Error-Log (plain rename without a dialog just executes for a bit then reverts my change and reports nothing). This stack trace shows a particular rename-operation exception. You can tell the stack trace matches because it has RefactoringExecutionHelper and RenameLinkedMode.doRename in it.
– Curtis Yallop
Mar 1 at 19:02
Ok, after this fixed my problem, I renamed a couple more methods and got the same error again. Restarting Eclipse fixed it. Note that I also had to restart Eclipse the first time after installing SWT.
– Curtis Yallop
Mar 1 at 19:07
add a comment |
I was seeing the exact same issue as the OP when I was trying to rename both variables, and method names. After I restarted Eclipse, the Refactor->Rename functionality worked correctly.
add a comment |
With 4.4 (Luna), I had cross-project refactoring problems after large refactorings - deleting the /.metadata/.plugins/org.eclipse.jdt.core
folder fixed that for me
add a comment |
If something not overly obvious makes a refactor fail, you can look for problems by attempting to preview the refactor rather than trying to execute it.
As Dicky Moore mentioned, you cannot refactor with errors in your project... But these aren't always code errors or build path issues that Eclipse marks. So sometimes it doesn't appear as though you have any errors and it will still fail. "Preview", as mentioned above will show these problems in an error dialog, even if they never show up elsewhere.
From there, you can configure your project to fix the errors (A common one is that the refactor tries to account for an output folder that it shouldn't, which can be fixed by excluding the folder in your Build Path > Source
settings.) or uninstall problematic plugins.
add a comment |
Had same issue:
- left click on property name in java class
- right click
- refactor
- rename
- do the rename
- press enter
- green progress bar appears on footer menu but never finishes
- to recover i have to kill eclipse (you can try exiting but it will hang when saving workbench state)
I'm running this on windows:
- Version: Kepler Service Release 2
- Build id: 20140224-0627
I 'fixed' the behaviour by:
- making a small change to the file
- saving the file
- retried the refactor and it worked fine (although there is an uncomfortable delay waiting for the refactor to complete circa five seconds)
There were no errors in the project, nothing obvious in the logs when it hangs and deleting/reimporting the project from the workspace did not work either (and deleting .classpath .project and .settings before re-importing).
add a comment |
Try the following (just worked for me):
- Delete the project
- Create a new java project with the same name
add a comment |
A quick workaround which worked for me:
- Add the static modifier to your method signature ("forces" compilation error through just in time compilation on all references)
- Refactor the method name (the errors remain)
- Remove the static modifier (recompiles with changed method signature, errors gone...)
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f11379808%2fcant-refactor-rename-in-eclipse%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
12 Answers
12
active
oldest
votes
12 Answers
12
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try to delete the project from Eclipse (don't delete project contents on disk) and then reload it.
add a comment |
Try to delete the project from Eclipse (don't delete project contents on disk) and then reload it.
add a comment |
Try to delete the project from Eclipse (don't delete project contents on disk) and then reload it.
Try to delete the project from Eclipse (don't delete project contents on disk) and then reload it.
answered Oct 12 '12 at 22:24
KevinKevin
14424
14424
add a comment |
add a comment |
I wanted to add some information to some other answers here.
Archenoth's answer points out you can get more information from running Preview on the rename operation. It took me a while to figure out how to get to preview: type the rename keystroke a second time to get the dialog. Sometimes Preview didn't give the error information (and neither did the quick rename without the ppoup) but clicking OK in the dialog did say more.
MutantXenu found information in the logs by going into files in the workspace, but you can also get to these within Eclipse by going to the Error Log view (from Cmd-3)
When I had this problem, the error log pointed me to this failed assertion: "Search for method declaration did not find original element" which led to some unresolved bugs. (I'm running Kepler, but the problem is apparently hard to replicate and I don't see evidence it's resolved. See here and here.)
You can see if you're experiencing this specific bug by selecting the method and using Cmd-G (or Ctrl-G: Search > Declarations > Workspace). Eclipse is unable to find the method you're trying to rename and the search comes up empty.
My case suggests it's possible the error might have to do with identically-named methods in different classes. When the problem is occuring with one method, it doesn't affect most others.
Refresh, Project->Clean, and restarting Eclipse were not helpful to me.
Kevin's answer worked for me: "Try to delete the project from Eclipse (don't delete project contents on disk) and then reload it."
add a comment |
I wanted to add some information to some other answers here.
Archenoth's answer points out you can get more information from running Preview on the rename operation. It took me a while to figure out how to get to preview: type the rename keystroke a second time to get the dialog. Sometimes Preview didn't give the error information (and neither did the quick rename without the ppoup) but clicking OK in the dialog did say more.
MutantXenu found information in the logs by going into files in the workspace, but you can also get to these within Eclipse by going to the Error Log view (from Cmd-3)
When I had this problem, the error log pointed me to this failed assertion: "Search for method declaration did not find original element" which led to some unresolved bugs. (I'm running Kepler, but the problem is apparently hard to replicate and I don't see evidence it's resolved. See here and here.)
You can see if you're experiencing this specific bug by selecting the method and using Cmd-G (or Ctrl-G: Search > Declarations > Workspace). Eclipse is unable to find the method you're trying to rename and the search comes up empty.
My case suggests it's possible the error might have to do with identically-named methods in different classes. When the problem is occuring with one method, it doesn't affect most others.
Refresh, Project->Clean, and restarting Eclipse were not helpful to me.
Kevin's answer worked for me: "Try to delete the project from Eclipse (don't delete project contents on disk) and then reload it."
add a comment |
I wanted to add some information to some other answers here.
Archenoth's answer points out you can get more information from running Preview on the rename operation. It took me a while to figure out how to get to preview: type the rename keystroke a second time to get the dialog. Sometimes Preview didn't give the error information (and neither did the quick rename without the ppoup) but clicking OK in the dialog did say more.
MutantXenu found information in the logs by going into files in the workspace, but you can also get to these within Eclipse by going to the Error Log view (from Cmd-3)
When I had this problem, the error log pointed me to this failed assertion: "Search for method declaration did not find original element" which led to some unresolved bugs. (I'm running Kepler, but the problem is apparently hard to replicate and I don't see evidence it's resolved. See here and here.)
You can see if you're experiencing this specific bug by selecting the method and using Cmd-G (or Ctrl-G: Search > Declarations > Workspace). Eclipse is unable to find the method you're trying to rename and the search comes up empty.
My case suggests it's possible the error might have to do with identically-named methods in different classes. When the problem is occuring with one method, it doesn't affect most others.
Refresh, Project->Clean, and restarting Eclipse were not helpful to me.
Kevin's answer worked for me: "Try to delete the project from Eclipse (don't delete project contents on disk) and then reload it."
I wanted to add some information to some other answers here.
Archenoth's answer points out you can get more information from running Preview on the rename operation. It took me a while to figure out how to get to preview: type the rename keystroke a second time to get the dialog. Sometimes Preview didn't give the error information (and neither did the quick rename without the ppoup) but clicking OK in the dialog did say more.
MutantXenu found information in the logs by going into files in the workspace, but you can also get to these within Eclipse by going to the Error Log view (from Cmd-3)
When I had this problem, the error log pointed me to this failed assertion: "Search for method declaration did not find original element" which led to some unresolved bugs. (I'm running Kepler, but the problem is apparently hard to replicate and I don't see evidence it's resolved. See here and here.)
You can see if you're experiencing this specific bug by selecting the method and using Cmd-G (or Ctrl-G: Search > Declarations > Workspace). Eclipse is unable to find the method you're trying to rename and the search comes up empty.
My case suggests it's possible the error might have to do with identically-named methods in different classes. When the problem is occuring with one method, it doesn't affect most others.
Refresh, Project->Clean, and restarting Eclipse were not helpful to me.
Kevin's answer worked for me: "Try to delete the project from Eclipse (don't delete project contents on disk) and then reload it."
edited May 23 '17 at 12:17
Community♦
11
11
answered Dec 17 '14 at 17:03
Joshua GoldbergJoshua Goldberg
2,8311934
2,8311934
add a comment |
add a comment |
While renaming methods directly in the editor does not work in very rare cases and then the IDE restores the orignal method name after pressing return key - kind of "agnostic mode" :-), when I do the same via Refactoring -> Change Methode Signature, in the upper right corner I change the method name, then I receive a fully detailed error message: "An unexpected exception occured while performing the refactoring... Reason: anonymous #1 in .... in lambda #1 ... in ... Working Copy ... does not exist."
This indicates, that renaming methods triggers this failure, when the method to be renamed is used in the context of an lambda or anonymous class.
To check, comment out the occurence in the lambda or anonymous class, the refactoring/renaming could then work as expected as it did in my case.
add a comment |
While renaming methods directly in the editor does not work in very rare cases and then the IDE restores the orignal method name after pressing return key - kind of "agnostic mode" :-), when I do the same via Refactoring -> Change Methode Signature, in the upper right corner I change the method name, then I receive a fully detailed error message: "An unexpected exception occured while performing the refactoring... Reason: anonymous #1 in .... in lambda #1 ... in ... Working Copy ... does not exist."
This indicates, that renaming methods triggers this failure, when the method to be renamed is used in the context of an lambda or anonymous class.
To check, comment out the occurence in the lambda or anonymous class, the refactoring/renaming could then work as expected as it did in my case.
add a comment |
While renaming methods directly in the editor does not work in very rare cases and then the IDE restores the orignal method name after pressing return key - kind of "agnostic mode" :-), when I do the same via Refactoring -> Change Methode Signature, in the upper right corner I change the method name, then I receive a fully detailed error message: "An unexpected exception occured while performing the refactoring... Reason: anonymous #1 in .... in lambda #1 ... in ... Working Copy ... does not exist."
This indicates, that renaming methods triggers this failure, when the method to be renamed is used in the context of an lambda or anonymous class.
To check, comment out the occurence in the lambda or anonymous class, the refactoring/renaming could then work as expected as it did in my case.
While renaming methods directly in the editor does not work in very rare cases and then the IDE restores the orignal method name after pressing return key - kind of "agnostic mode" :-), when I do the same via Refactoring -> Change Methode Signature, in the upper right corner I change the method name, then I receive a fully detailed error message: "An unexpected exception occured while performing the refactoring... Reason: anonymous #1 in .... in lambda #1 ... in ... Working Copy ... does not exist."
This indicates, that renaming methods triggers this failure, when the method to be renamed is used in the context of an lambda or anonymous class.
To check, comment out the occurence in the lambda or anonymous class, the refactoring/renaming could then work as expected as it did in my case.
edited Mar 2 '15 at 15:41
answered Mar 2 '15 at 12:10
Hartmut P.Hartmut P.
2,16722430
2,16722430
add a comment |
add a comment |
I had this problem with Eclipse Helios. I looked in the .metadata directory of the workspace and opened the .log file. It had a pretty long chain of references relating to the error, but the pertinent parts of that were:
java.lang.NoClassDefFoundError: org/eclipse/jdt/core/IMethod
and
java.lang.reflect.InvocationTargetException at
org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
at
org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
at
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
at
org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2606)
at
org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:191)
at
org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:151)
at
org.eclipse.jdt.ui.refactoring.RenameSupport.perform(RenameSupport.java:197)
at
org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode.doRename(RenameLinkedMode.java:361)
at
org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode$EditorSynchronizer.left(RenameLinkedMode.java:119)
at
org.eclipse.jface.text.link.LinkedModeModel.exit(LinkedModeModel.java:341)
at
org.eclipse.jface.text.link.LinkedModeUI$4.run(LinkedModeUI.java:1194)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
I went to Help > Install New Software > What is already installed, and then selected everything relating to org.eclipse.swt and clicked on Uninstall. After restarting Eclipse, the problem went away and I was able to refactor / rename normally again.
Same here with Kepler
– leonbloy
Sep 23 '13 at 20:09
add a comment |
I had this problem with Eclipse Helios. I looked in the .metadata directory of the workspace and opened the .log file. It had a pretty long chain of references relating to the error, but the pertinent parts of that were:
java.lang.NoClassDefFoundError: org/eclipse/jdt/core/IMethod
and
java.lang.reflect.InvocationTargetException at
org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
at
org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
at
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
at
org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2606)
at
org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:191)
at
org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:151)
at
org.eclipse.jdt.ui.refactoring.RenameSupport.perform(RenameSupport.java:197)
at
org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode.doRename(RenameLinkedMode.java:361)
at
org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode$EditorSynchronizer.left(RenameLinkedMode.java:119)
at
org.eclipse.jface.text.link.LinkedModeModel.exit(LinkedModeModel.java:341)
at
org.eclipse.jface.text.link.LinkedModeUI$4.run(LinkedModeUI.java:1194)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
I went to Help > Install New Software > What is already installed, and then selected everything relating to org.eclipse.swt and clicked on Uninstall. After restarting Eclipse, the problem went away and I was able to refactor / rename normally again.
Same here with Kepler
– leonbloy
Sep 23 '13 at 20:09
add a comment |
I had this problem with Eclipse Helios. I looked in the .metadata directory of the workspace and opened the .log file. It had a pretty long chain of references relating to the error, but the pertinent parts of that were:
java.lang.NoClassDefFoundError: org/eclipse/jdt/core/IMethod
and
java.lang.reflect.InvocationTargetException at
org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
at
org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
at
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
at
org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2606)
at
org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:191)
at
org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:151)
at
org.eclipse.jdt.ui.refactoring.RenameSupport.perform(RenameSupport.java:197)
at
org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode.doRename(RenameLinkedMode.java:361)
at
org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode$EditorSynchronizer.left(RenameLinkedMode.java:119)
at
org.eclipse.jface.text.link.LinkedModeModel.exit(LinkedModeModel.java:341)
at
org.eclipse.jface.text.link.LinkedModeUI$4.run(LinkedModeUI.java:1194)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
I went to Help > Install New Software > What is already installed, and then selected everything relating to org.eclipse.swt and clicked on Uninstall. After restarting Eclipse, the problem went away and I was able to refactor / rename normally again.
I had this problem with Eclipse Helios. I looked in the .metadata directory of the workspace and opened the .log file. It had a pretty long chain of references relating to the error, but the pertinent parts of that were:
java.lang.NoClassDefFoundError: org/eclipse/jdt/core/IMethod
and
java.lang.reflect.InvocationTargetException at
org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
at
org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
at
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
at
org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2606)
at
org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:191)
at
org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:151)
at
org.eclipse.jdt.ui.refactoring.RenameSupport.perform(RenameSupport.java:197)
at
org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode.doRename(RenameLinkedMode.java:361)
at
org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode$EditorSynchronizer.left(RenameLinkedMode.java:119)
at
org.eclipse.jface.text.link.LinkedModeModel.exit(LinkedModeModel.java:341)
at
org.eclipse.jface.text.link.LinkedModeUI$4.run(LinkedModeUI.java:1194)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
I went to Help > Install New Software > What is already installed, and then selected everything relating to org.eclipse.swt and clicked on Uninstall. After restarting Eclipse, the problem went away and I was able to refactor / rename normally again.
answered Jun 1 '13 at 15:45
MutantXenuMutantXenu
6291915
6291915
Same here with Kepler
– leonbloy
Sep 23 '13 at 20:09
add a comment |
Same here with Kepler
– leonbloy
Sep 23 '13 at 20:09
Same here with Kepler
– leonbloy
Sep 23 '13 at 20:09
Same here with Kepler
– leonbloy
Sep 23 '13 at 20:09
add a comment |
The refactor will not work if there are any errors in your project.
Fix the errors, or just comment out the section being detected as an error in order to run the refactor.
This worked for me.
add a comment |
The refactor will not work if there are any errors in your project.
Fix the errors, or just comment out the section being detected as an error in order to run the refactor.
This worked for me.
add a comment |
The refactor will not work if there are any errors in your project.
Fix the errors, or just comment out the section being detected as an error in order to run the refactor.
This worked for me.
The refactor will not work if there are any errors in your project.
Fix the errors, or just comment out the section being detected as an error in order to run the refactor.
This worked for me.
answered Oct 14 '13 at 21:22
Dicky MooreDicky Moore
3021220
3021220
add a comment |
add a comment |
I've been struggling this issue too. When I looked on Error Log View of Eclipse, I noticed that each time I tried to rename a variable or method, I was getting this kind of exception:
java.lang.reflect.InvocationTargetException at
org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421) at
org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759) at
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756) at
org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2606) at
org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:191) at
org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:151) at
org.eclipse.jdt.ui.refactoring.RenameSupport.perform(RenameSupport.java:197) at
org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode.doRename(RenameLinkedMode.java:361) at
org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode$EditorSynchronizer.left(RenameLinkedMode.java:119) at
org.eclipse.jface.text.link.LinkedModeModel.exit(LinkedModeModel.java:341) at
org.eclipse.jface.text.link.LinkedModeUI$4.run(LinkedModeUI.java:1194) at
org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041) at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
I noticed it all starts from SWT libraries. Tried to update SWT, but for some reasons I wasn't able even to find SWT installed.
So I simply installed SWT Tools 3.106.0.v20170503-0851 via Help -> Install new Software, what happily solved the issue.
Welcome to StackOverflow! It's not clear to me that your answer matches the question that was asked. If it does, could you please make the connection more explicit? Thank you.
– Ellen Spertus
Apr 1 '18 at 20:44
You can get the site-url to use in Help > Install_New_Software from here: eclipse.org/swt/updatesite.php - I used the milestone-update-site: download.eclipse.org/eclipse/updates/milestones
– Curtis Yallop
Mar 1 at 18:54
@EllenSpertus It does match the question and solved the problem for me. This stack trace comes from the error-log window in eclipse. When using change-signature or the Refactor>Rename,click-Options, it reports the error and tells you to look at the Error-Log (plain rename without a dialog just executes for a bit then reverts my change and reports nothing). This stack trace shows a particular rename-operation exception. You can tell the stack trace matches because it has RefactoringExecutionHelper and RenameLinkedMode.doRename in it.
– Curtis Yallop
Mar 1 at 19:02
Ok, after this fixed my problem, I renamed a couple more methods and got the same error again. Restarting Eclipse fixed it. Note that I also had to restart Eclipse the first time after installing SWT.
– Curtis Yallop
Mar 1 at 19:07
add a comment |
I've been struggling this issue too. When I looked on Error Log View of Eclipse, I noticed that each time I tried to rename a variable or method, I was getting this kind of exception:
java.lang.reflect.InvocationTargetException at
org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421) at
org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759) at
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756) at
org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2606) at
org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:191) at
org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:151) at
org.eclipse.jdt.ui.refactoring.RenameSupport.perform(RenameSupport.java:197) at
org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode.doRename(RenameLinkedMode.java:361) at
org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode$EditorSynchronizer.left(RenameLinkedMode.java:119) at
org.eclipse.jface.text.link.LinkedModeModel.exit(LinkedModeModel.java:341) at
org.eclipse.jface.text.link.LinkedModeUI$4.run(LinkedModeUI.java:1194) at
org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041) at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
I noticed it all starts from SWT libraries. Tried to update SWT, but for some reasons I wasn't able even to find SWT installed.
So I simply installed SWT Tools 3.106.0.v20170503-0851 via Help -> Install new Software, what happily solved the issue.
Welcome to StackOverflow! It's not clear to me that your answer matches the question that was asked. If it does, could you please make the connection more explicit? Thank you.
– Ellen Spertus
Apr 1 '18 at 20:44
You can get the site-url to use in Help > Install_New_Software from here: eclipse.org/swt/updatesite.php - I used the milestone-update-site: download.eclipse.org/eclipse/updates/milestones
– Curtis Yallop
Mar 1 at 18:54
@EllenSpertus It does match the question and solved the problem for me. This stack trace comes from the error-log window in eclipse. When using change-signature or the Refactor>Rename,click-Options, it reports the error and tells you to look at the Error-Log (plain rename without a dialog just executes for a bit then reverts my change and reports nothing). This stack trace shows a particular rename-operation exception. You can tell the stack trace matches because it has RefactoringExecutionHelper and RenameLinkedMode.doRename in it.
– Curtis Yallop
Mar 1 at 19:02
Ok, after this fixed my problem, I renamed a couple more methods and got the same error again. Restarting Eclipse fixed it. Note that I also had to restart Eclipse the first time after installing SWT.
– Curtis Yallop
Mar 1 at 19:07
add a comment |
I've been struggling this issue too. When I looked on Error Log View of Eclipse, I noticed that each time I tried to rename a variable or method, I was getting this kind of exception:
java.lang.reflect.InvocationTargetException at
org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421) at
org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759) at
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756) at
org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2606) at
org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:191) at
org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:151) at
org.eclipse.jdt.ui.refactoring.RenameSupport.perform(RenameSupport.java:197) at
org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode.doRename(RenameLinkedMode.java:361) at
org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode$EditorSynchronizer.left(RenameLinkedMode.java:119) at
org.eclipse.jface.text.link.LinkedModeModel.exit(LinkedModeModel.java:341) at
org.eclipse.jface.text.link.LinkedModeUI$4.run(LinkedModeUI.java:1194) at
org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041) at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
I noticed it all starts from SWT libraries. Tried to update SWT, but for some reasons I wasn't able even to find SWT installed.
So I simply installed SWT Tools 3.106.0.v20170503-0851 via Help -> Install new Software, what happily solved the issue.
I've been struggling this issue too. When I looked on Error Log View of Eclipse, I noticed that each time I tried to rename a variable or method, I was getting this kind of exception:
java.lang.reflect.InvocationTargetException at
org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421) at
org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759) at
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756) at
org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2606) at
org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:191) at
org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:151) at
org.eclipse.jdt.ui.refactoring.RenameSupport.perform(RenameSupport.java:197) at
org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode.doRename(RenameLinkedMode.java:361) at
org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode$EditorSynchronizer.left(RenameLinkedMode.java:119) at
org.eclipse.jface.text.link.LinkedModeModel.exit(LinkedModeModel.java:341) at
org.eclipse.jface.text.link.LinkedModeUI$4.run(LinkedModeUI.java:1194) at
org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041) at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
I noticed it all starts from SWT libraries. Tried to update SWT, but for some reasons I wasn't able even to find SWT installed.
So I simply installed SWT Tools 3.106.0.v20170503-0851 via Help -> Install new Software, what happily solved the issue.
edited Apr 4 '18 at 11:22
Piotr Ławniczak
32
32
answered Apr 1 '18 at 19:48
Piotr ŁawniczakPiotr Ławniczak
112
112
Welcome to StackOverflow! It's not clear to me that your answer matches the question that was asked. If it does, could you please make the connection more explicit? Thank you.
– Ellen Spertus
Apr 1 '18 at 20:44
You can get the site-url to use in Help > Install_New_Software from here: eclipse.org/swt/updatesite.php - I used the milestone-update-site: download.eclipse.org/eclipse/updates/milestones
– Curtis Yallop
Mar 1 at 18:54
@EllenSpertus It does match the question and solved the problem for me. This stack trace comes from the error-log window in eclipse. When using change-signature or the Refactor>Rename,click-Options, it reports the error and tells you to look at the Error-Log (plain rename without a dialog just executes for a bit then reverts my change and reports nothing). This stack trace shows a particular rename-operation exception. You can tell the stack trace matches because it has RefactoringExecutionHelper and RenameLinkedMode.doRename in it.
– Curtis Yallop
Mar 1 at 19:02
Ok, after this fixed my problem, I renamed a couple more methods and got the same error again. Restarting Eclipse fixed it. Note that I also had to restart Eclipse the first time after installing SWT.
– Curtis Yallop
Mar 1 at 19:07
add a comment |
Welcome to StackOverflow! It's not clear to me that your answer matches the question that was asked. If it does, could you please make the connection more explicit? Thank you.
– Ellen Spertus
Apr 1 '18 at 20:44
You can get the site-url to use in Help > Install_New_Software from here: eclipse.org/swt/updatesite.php - I used the milestone-update-site: download.eclipse.org/eclipse/updates/milestones
– Curtis Yallop
Mar 1 at 18:54
@EllenSpertus It does match the question and solved the problem for me. This stack trace comes from the error-log window in eclipse. When using change-signature or the Refactor>Rename,click-Options, it reports the error and tells you to look at the Error-Log (plain rename without a dialog just executes for a bit then reverts my change and reports nothing). This stack trace shows a particular rename-operation exception. You can tell the stack trace matches because it has RefactoringExecutionHelper and RenameLinkedMode.doRename in it.
– Curtis Yallop
Mar 1 at 19:02
Ok, after this fixed my problem, I renamed a couple more methods and got the same error again. Restarting Eclipse fixed it. Note that I also had to restart Eclipse the first time after installing SWT.
– Curtis Yallop
Mar 1 at 19:07
Welcome to StackOverflow! It's not clear to me that your answer matches the question that was asked. If it does, could you please make the connection more explicit? Thank you.
– Ellen Spertus
Apr 1 '18 at 20:44
Welcome to StackOverflow! It's not clear to me that your answer matches the question that was asked. If it does, could you please make the connection more explicit? Thank you.
– Ellen Spertus
Apr 1 '18 at 20:44
You can get the site-url to use in Help > Install_New_Software from here: eclipse.org/swt/updatesite.php - I used the milestone-update-site: download.eclipse.org/eclipse/updates/milestones
– Curtis Yallop
Mar 1 at 18:54
You can get the site-url to use in Help > Install_New_Software from here: eclipse.org/swt/updatesite.php - I used the milestone-update-site: download.eclipse.org/eclipse/updates/milestones
– Curtis Yallop
Mar 1 at 18:54
@EllenSpertus It does match the question and solved the problem for me. This stack trace comes from the error-log window in eclipse. When using change-signature or the Refactor>Rename,click-Options, it reports the error and tells you to look at the Error-Log (plain rename without a dialog just executes for a bit then reverts my change and reports nothing). This stack trace shows a particular rename-operation exception. You can tell the stack trace matches because it has RefactoringExecutionHelper and RenameLinkedMode.doRename in it.
– Curtis Yallop
Mar 1 at 19:02
@EllenSpertus It does match the question and solved the problem for me. This stack trace comes from the error-log window in eclipse. When using change-signature or the Refactor>Rename,click-Options, it reports the error and tells you to look at the Error-Log (plain rename without a dialog just executes for a bit then reverts my change and reports nothing). This stack trace shows a particular rename-operation exception. You can tell the stack trace matches because it has RefactoringExecutionHelper and RenameLinkedMode.doRename in it.
– Curtis Yallop
Mar 1 at 19:02
Ok, after this fixed my problem, I renamed a couple more methods and got the same error again. Restarting Eclipse fixed it. Note that I also had to restart Eclipse the first time after installing SWT.
– Curtis Yallop
Mar 1 at 19:07
Ok, after this fixed my problem, I renamed a couple more methods and got the same error again. Restarting Eclipse fixed it. Note that I also had to restart Eclipse the first time after installing SWT.
– Curtis Yallop
Mar 1 at 19:07
add a comment |
I was seeing the exact same issue as the OP when I was trying to rename both variables, and method names. After I restarted Eclipse, the Refactor->Rename functionality worked correctly.
add a comment |
I was seeing the exact same issue as the OP when I was trying to rename both variables, and method names. After I restarted Eclipse, the Refactor->Rename functionality worked correctly.
add a comment |
I was seeing the exact same issue as the OP when I was trying to rename both variables, and method names. After I restarted Eclipse, the Refactor->Rename functionality worked correctly.
I was seeing the exact same issue as the OP when I was trying to rename both variables, and method names. After I restarted Eclipse, the Refactor->Rename functionality worked correctly.
answered Feb 18 '13 at 21:12
jakethasnake919jakethasnake919
1
1
add a comment |
add a comment |
With 4.4 (Luna), I had cross-project refactoring problems after large refactorings - deleting the /.metadata/.plugins/org.eclipse.jdt.core
folder fixed that for me
add a comment |
With 4.4 (Luna), I had cross-project refactoring problems after large refactorings - deleting the /.metadata/.plugins/org.eclipse.jdt.core
folder fixed that for me
add a comment |
With 4.4 (Luna), I had cross-project refactoring problems after large refactorings - deleting the /.metadata/.plugins/org.eclipse.jdt.core
folder fixed that for me
With 4.4 (Luna), I had cross-project refactoring problems after large refactorings - deleting the /.metadata/.plugins/org.eclipse.jdt.core
folder fixed that for me
edited Oct 9 '14 at 22:00
answered Oct 4 '14 at 1:07
nicklenickle
414
414
add a comment |
add a comment |
If something not overly obvious makes a refactor fail, you can look for problems by attempting to preview the refactor rather than trying to execute it.
As Dicky Moore mentioned, you cannot refactor with errors in your project... But these aren't always code errors or build path issues that Eclipse marks. So sometimes it doesn't appear as though you have any errors and it will still fail. "Preview", as mentioned above will show these problems in an error dialog, even if they never show up elsewhere.
From there, you can configure your project to fix the errors (A common one is that the refactor tries to account for an output folder that it shouldn't, which can be fixed by excluding the folder in your Build Path > Source
settings.) or uninstall problematic plugins.
add a comment |
If something not overly obvious makes a refactor fail, you can look for problems by attempting to preview the refactor rather than trying to execute it.
As Dicky Moore mentioned, you cannot refactor with errors in your project... But these aren't always code errors or build path issues that Eclipse marks. So sometimes it doesn't appear as though you have any errors and it will still fail. "Preview", as mentioned above will show these problems in an error dialog, even if they never show up elsewhere.
From there, you can configure your project to fix the errors (A common one is that the refactor tries to account for an output folder that it shouldn't, which can be fixed by excluding the folder in your Build Path > Source
settings.) or uninstall problematic plugins.
add a comment |
If something not overly obvious makes a refactor fail, you can look for problems by attempting to preview the refactor rather than trying to execute it.
As Dicky Moore mentioned, you cannot refactor with errors in your project... But these aren't always code errors or build path issues that Eclipse marks. So sometimes it doesn't appear as though you have any errors and it will still fail. "Preview", as mentioned above will show these problems in an error dialog, even if they never show up elsewhere.
From there, you can configure your project to fix the errors (A common one is that the refactor tries to account for an output folder that it shouldn't, which can be fixed by excluding the folder in your Build Path > Source
settings.) or uninstall problematic plugins.
If something not overly obvious makes a refactor fail, you can look for problems by attempting to preview the refactor rather than trying to execute it.
As Dicky Moore mentioned, you cannot refactor with errors in your project... But these aren't always code errors or build path issues that Eclipse marks. So sometimes it doesn't appear as though you have any errors and it will still fail. "Preview", as mentioned above will show these problems in an error dialog, even if they never show up elsewhere.
From there, you can configure your project to fix the errors (A common one is that the refactor tries to account for an output folder that it shouldn't, which can be fixed by excluding the folder in your Build Path > Source
settings.) or uninstall problematic plugins.
edited Nov 26 '14 at 16:46
answered Jun 16 '14 at 18:24
ArchenothArchenoth
270413
270413
add a comment |
add a comment |
Had same issue:
- left click on property name in java class
- right click
- refactor
- rename
- do the rename
- press enter
- green progress bar appears on footer menu but never finishes
- to recover i have to kill eclipse (you can try exiting but it will hang when saving workbench state)
I'm running this on windows:
- Version: Kepler Service Release 2
- Build id: 20140224-0627
I 'fixed' the behaviour by:
- making a small change to the file
- saving the file
- retried the refactor and it worked fine (although there is an uncomfortable delay waiting for the refactor to complete circa five seconds)
There were no errors in the project, nothing obvious in the logs when it hangs and deleting/reimporting the project from the workspace did not work either (and deleting .classpath .project and .settings before re-importing).
add a comment |
Had same issue:
- left click on property name in java class
- right click
- refactor
- rename
- do the rename
- press enter
- green progress bar appears on footer menu but never finishes
- to recover i have to kill eclipse (you can try exiting but it will hang when saving workbench state)
I'm running this on windows:
- Version: Kepler Service Release 2
- Build id: 20140224-0627
I 'fixed' the behaviour by:
- making a small change to the file
- saving the file
- retried the refactor and it worked fine (although there is an uncomfortable delay waiting for the refactor to complete circa five seconds)
There were no errors in the project, nothing obvious in the logs when it hangs and deleting/reimporting the project from the workspace did not work either (and deleting .classpath .project and .settings before re-importing).
add a comment |
Had same issue:
- left click on property name in java class
- right click
- refactor
- rename
- do the rename
- press enter
- green progress bar appears on footer menu but never finishes
- to recover i have to kill eclipse (you can try exiting but it will hang when saving workbench state)
I'm running this on windows:
- Version: Kepler Service Release 2
- Build id: 20140224-0627
I 'fixed' the behaviour by:
- making a small change to the file
- saving the file
- retried the refactor and it worked fine (although there is an uncomfortable delay waiting for the refactor to complete circa five seconds)
There were no errors in the project, nothing obvious in the logs when it hangs and deleting/reimporting the project from the workspace did not work either (and deleting .classpath .project and .settings before re-importing).
Had same issue:
- left click on property name in java class
- right click
- refactor
- rename
- do the rename
- press enter
- green progress bar appears on footer menu but never finishes
- to recover i have to kill eclipse (you can try exiting but it will hang when saving workbench state)
I'm running this on windows:
- Version: Kepler Service Release 2
- Build id: 20140224-0627
I 'fixed' the behaviour by:
- making a small change to the file
- saving the file
- retried the refactor and it worked fine (although there is an uncomfortable delay waiting for the refactor to complete circa five seconds)
There were no errors in the project, nothing obvious in the logs when it hangs and deleting/reimporting the project from the workspace did not work either (and deleting .classpath .project and .settings before re-importing).
answered May 26 '17 at 12:05
Moika TurnsMoika Turns
167312
167312
add a comment |
add a comment |
Try the following (just worked for me):
- Delete the project
- Create a new java project with the same name
add a comment |
Try the following (just worked for me):
- Delete the project
- Create a new java project with the same name
add a comment |
Try the following (just worked for me):
- Delete the project
- Create a new java project with the same name
Try the following (just worked for me):
- Delete the project
- Create a new java project with the same name
answered Feb 14 '18 at 15:14
Yoav SchneiderYoav Schneider
1
1
add a comment |
add a comment |
A quick workaround which worked for me:
- Add the static modifier to your method signature ("forces" compilation error through just in time compilation on all references)
- Refactor the method name (the errors remain)
- Remove the static modifier (recompiles with changed method signature, errors gone...)
add a comment |
A quick workaround which worked for me:
- Add the static modifier to your method signature ("forces" compilation error through just in time compilation on all references)
- Refactor the method name (the errors remain)
- Remove the static modifier (recompiles with changed method signature, errors gone...)
add a comment |
A quick workaround which worked for me:
- Add the static modifier to your method signature ("forces" compilation error through just in time compilation on all references)
- Refactor the method name (the errors remain)
- Remove the static modifier (recompiles with changed method signature, errors gone...)
A quick workaround which worked for me:
- Add the static modifier to your method signature ("forces" compilation error through just in time compilation on all references)
- Refactor the method name (the errors remain)
- Remove the static modifier (recompiles with changed method signature, errors gone...)
answered Nov 15 '18 at 6:00
AlexAlex
11
11
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f11379808%2fcant-refactor-rename-in-eclipse%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
What view are you in? What are you renaming, and to what? You only have to give more information if you actually expect some help...
– arcy
Jul 8 '12 at 0:53
1
Also verify if the project has any compile error. Sometime with compile errors it does not let you refactor things.
– vikas
Jul 8 '12 at 12:20
1
This happened to me when attempting rename on a Javascript method. JSDT is installed. Removing and adding project did not help.
– Nilzor
Dec 12 '13 at 21:09