Bug 203745 - [refactoring scripts] Importing exported refactoring scripts fails
Summary: [refactoring scripts] Importing exported refactoring scripts fails
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-18 08:14 EDT by Dani Megert CLA
Modified: 2023-03-25 11:37 EDT (History)
1 user (show)

See Also:


Attachments
wizard showing no error (12.15 KB, image/png)
2007-09-18 08:18 EDT, Dani Megert CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2007-09-18 08:14:34 EDT
I20070918-0010.

When try to import the generated refactoring scripts into another workspace I get tons of log entries (see below) and the errors are not shown in the wizard (see attached screen shot).
Comment 1 Dani Megert CLA 2007-09-18 08:16:04 EDT
One of the .log entries (they are all the same):

!ENTRY org.eclipse.ltk.ui.refactoring 4 10000 2007-09-18 14:10:41.412
!MESSAGE Internal Error
!STACK 0
java.lang.reflect.InvocationTargetException
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:381)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934)
	at org.eclipse.ltk.ui.refactoring.history.RefactoringHistoryWizard.performFinish(RefactoringHistoryWizard.java:1077)
	at org.eclipse.ltk.internal.ui.refactoring.scripting.ApplyRefactoringScriptWizard.performFinish(ApplyRefactoringScriptWizard.java:170)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:621)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3742)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3353)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
	at org.eclipse.jface.window.Window.open(Window.java:801)
	at org.eclipse.ltk.ui.refactoring.actions.ApplyRefactoringScriptAction.showApplyScriptWizard(ApplyRefactoringScriptAction.java:64)
	at org.eclipse.ltk.ui.refactoring.actions.ApplyRefactoringScriptAction.run(ApplyRefactoringScriptAction.java:89)
	at org.eclipse.jdt.internal.ui.refactoring.actions.ApplyRefactoringScriptAction.run(ApplyRefactoringScriptAction.java:50)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:256)
	at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:543)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:489)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:401)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3742)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3353)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:515)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:455)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1193)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1169)
	at org.eclipse.core.launcher.Main.main(Main.java:30)
Caused by: java.lang.NullPointerException
	at org.eclipse.jdt.internal.corext.refactoring.rename.MethodChecks.isVirtual(MethodChecks.java:46)
	at org.eclipse.jdt.internal.corext.refactoring.scripting.RenameMethodRefactoringContribution.createRefactoring(RenameMethodRefactoringContribution.java:51)
	at org.eclipse.jdt.core.refactoring.descriptors.JavaRefactoringDescriptor.createRefactoring(JavaRefactoringDescriptor.java:298)
	at org.eclipse.ltk.ui.refactoring.history.RefactoringHistoryWizard.createRefactoring(RefactoringHistoryWizard.java:560)
	at org.eclipse.ltk.ui.refactoring.history.RefactoringHistoryWizard$10.createRefactoring(RefactoringHistoryWizard.java:1040)
	at org.eclipse.ltk.core.refactoring.PerformRefactoringHistoryOperation.run(PerformRefactoringHistoryOperation.java:148)
	at org.eclipse.ltk.ui.refactoring.history.RefactoringHistoryWizard$10.run(RefactoringHistoryWizard.java:1070)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
	at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
	... 48 more
Comment 2 Dani Megert CLA 2007-09-18 08:18:15 EDT
Created attachment 78638 [details]
wizard showing no error
Comment 3 Markus Keller CLA 2007-09-19 05:44:15 EDT
Steps:

- have:
public class DDD {
	void m() { }
}
- rename m to method
- export script of this refactoring
- apply script to same workspace, pressing Finish in the wizard (pressing Next at least shows an 'internal error - check the log' message)

Two problems (both already in 3.3):
a) the script should gracefully fail if the input method is not available
b) error dialog should not be empty
Comment 4 Martin Aeschlimann CLA 2008-05-21 05:53:39 EDT
When I try this with 3.4 RC1 I get 2 error message. They are not really user understandable, but there are at least error messages. Not for 3.4
Comment 5 Eclipse Genie CLA 2019-03-21 02:26:17 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 6 Dani Megert CLA 2019-03-21 12:28:30 EDT
Still broken in 4.11.
Comment 7 Eclipse Genie CLA 2021-03-11 17:42:11 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 8 Eclipse Genie CLA 2023-03-25 11:37:42 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.