| Summary: | [refactoring] Change Function Signature broken. Cannot use at all. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] JSDT | Reporter: | Arin Lipman <dread45153> | ||||
| Component: | General | Assignee: | Victor Rubezhny <vrubezhny> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Chris Jaun <cmjaun> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cmjaun, llsomava, vrubezhny | ||||
| Version: | unspecified | Flags: | cmjaun:
review+
|
||||
| Target Milestone: | 3.5.2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Arin Lipman
Kindly provide us with a sample code to reproduce the bug. I'm using a simple stub of a function:
function test(one, two, thre)
{
return one + two + three;
}
I try to change the name of the function to myTestFunction within the Change Function Signature dialog, and the Preview and Ok buttons become disabled. Also, if you attempt to use the Edit dialog for the parameters, you cannot change the type.
I've also upgraded to the following:
Version: Indigo Release
Build id: 20110615-0604
I see the following NPE while trying to use Refactoring->Change Function Signature dialog: !ENTRY org.eclipse.ui 4 0 2013-10-21 17:15:25.678 !MESSAGE Unhandled event loop exception !STACK 0 java.lang.NullPointerException at org.eclipse.wst.jsdt.internal.corext.refactoring.structure.ChangeSignatureRefactoring.checkMethodName(ChangeSignatureRefactoring.java:488) at org.eclipse.wst.jsdt.internal.corext.refactoring.structure.ChangeSignatureRefactoring.checkSignature(ChangeSignatureRefactoring.java:348) at org.eclipse.wst.jsdt.internal.corext.refactoring.structure.ChangeSignatureRefactoring.checkSignature(ChangeSignatureRefactoring.java:343) at org.eclipse.wst.jsdt.internal.ui.refactoring.ChangeSignatureWizard$ChangeSignatureInputPage.updateStatus(ChangeSignatureWizard.java:372) at org.eclipse.wst.jsdt.internal.ui.refactoring.ChangeSignatureWizard$ChangeSignatureInputPage.update(ChangeSignatureWizard.java:358) at org.eclipse.wst.jsdt.internal.ui.refactoring.ChangeSignatureWizard$ChangeSignatureInputPage.access$3(ChangeSignatureWizard.java:357) at org.eclipse.wst.jsdt.internal.ui.refactoring.ChangeSignatureWizard$5.modifyText(ChangeSignatureWizard.java:252) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:179) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1392) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3742) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3363) at org.eclipse.jface.window.Window.runEventLoop(Window.java:826) at org.eclipse.jface.window.Window.open(Window.java:802) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run(RefactoringWizardOpenOperation.java:187) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:202) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:122) at org.eclipse.wst.jsdt.internal.ui.refactoring.actions.RefactoringStarter.activate(RefactoringStarter.java:45) at org.eclipse.wst.jsdt.internal.ui.refactoring.UserInterfaceStarter.activate(UserInterfaceStarter.java:57) at org.eclipse.wst.jsdt.internal.corext.refactoring.RefactoringExecutionStarter$1.activate(RefactoringExecutionStarter.java:197) at org.eclipse.wst.jsdt.internal.corext.refactoring.RefactoringExecutionStarter.startChangeSignatureRefactoring(RefactoringExecutionStarter.java:202) at org.eclipse.wst.jsdt.ui.actions.ModifyParametersAction.run(ModifyParametersAction.java:135) at org.eclipse.wst.jsdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:249) at org.eclipse.wst.jsdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:221) at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) Created attachment 236706 [details]
Patch that fixes the NPE in Change Function Signature dialog
Tha patch fixes the NPE, but I found another issue with refactoring here: Bug #419970 - the refactoring works correctly only when all the files are saved. |