Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#570 Generate constructor using fields exception

1.3.8
closed-fixed
nobody
5
2008-02-05
2007-09-09
Fabio Zadrozny
No

Can't use refactoring: generate constructor using fields with the case below.

class A(object):

def myMethod(self):
self.a = 10

The error in the error log is:
java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:350)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934)
at org.eclipse.ltk.ui.refactoring.RefactoringWizard.createChange(RefactoringWizard.java:579)
at org.eclipse.ltk.ui.refactoring.RefactoringWizard.computeUserInputSuccessorPage(RefactoringWizard.java:422)
at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.computeSuccessorPage(UserInputWizardPage.java:75)
at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.getNextPage(UserInputWizardPage.java:115)
at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:813)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:369)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616)
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:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run(RefactoringWizardOpenOperation.java:142)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:154)
at org.python.pydev.refactoring.ui.actions.internal.AbstractRefactoringAction.openWizard(AbstractRefactoringAction.java:94)
at org.python.pydev.refactoring.ui.actions.internal.AbstractRefactoringAction.run(AbstractRefactoringAction.java:109)
at org.python.pydev.refactoring.ui.actions.ConstructorFieldAction.run(ConstructorFieldAction.java:11)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:256)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
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:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
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:153)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
Caused by: java.lang.RuntimeException: Not implemented
at org.python.pydev.refactoring.ast.adapters.ClassDefAdapterFromClassDef.getFirstInit(ClassDefAdapterFromClassDef.java:39)
at org.python.pydev.refactoring.codegenerator.constructorfield.edit.ConstructorMethodEdit.extractArguments(ConstructorMethodEdit.java:127)
at org.python.pydev.refactoring.codegenerator.constructorfield.edit.ConstructorMethodEdit.getEditNode(ConstructorMethodEdit.java:56)
at org.python.pydev.refactoring.core.edit.AbstractTextEdit.getFormatedNode(AbstractTextEdit.java:39)
at org.python.pydev.refactoring.core.edit.AbstractInsertEdit.getEdit(AbstractInsertEdit.java:15)
at org.python.pydev.refactoring.codegenerator.constructorfield.ConstructorFieldChangeProcessor.processEdit(ConstructorFieldChangeProcessor.java:26)
at org.python.pydev.refactoring.core.change.AbstractFileChangeProcessor.createChange(AbstractFileChangeProcessor.java:42)
at org.python.pydev.refactoring.core.change.CompositeChangeProcessor.createChange(CompositeChangeProcessor.java:22)
at org.python.pydev.refactoring.core.AbstractPythonRefactoring.createChange(AbstractPythonRefactoring.java:53)
at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:121)
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$ModalContextThread.run(ModalContext.java:113)
Root exception:
java.lang.RuntimeException: Not implemented
at org.python.pydev.refactoring.ast.adapters.ClassDefAdapterFromClassDef.getFirstInit(ClassDefAdapterFromClassDef.java:39)
at org.python.pydev.refactoring.codegenerator.constructorfield.edit.ConstructorMethodEdit.extractArguments(ConstructorMethodEdit.java:127)
at org.python.pydev.refactoring.codegenerator.constructorfield.edit.ConstructorMethodEdit.getEditNode(ConstructorMethodEdit.java:56)
at org.python.pydev.refactoring.core.edit.AbstractTextEdit.getFormatedNode(AbstractTextEdit.java:39)
at org.python.pydev.refactoring.core.edit.AbstractInsertEdit.getEdit(AbstractInsertEdit.java:15)
at org.python.pydev.refactoring.codegenerator.constructorfield.ConstructorFieldChangeProcessor.processEdit(ConstructorFieldChangeProcessor.java:26)
at org.python.pydev.refactoring.core.change.AbstractFileChangeProcessor.createChange(AbstractFileChangeProcessor.java:42)
at org.python.pydev.refactoring.core.change.CompositeChangeProcessor.createChange(CompositeChangeProcessor.java:22)
at org.python.pydev.refactoring.core.AbstractPythonRefactoring.createChange(AbstractPythonRefactoring.java:53)
at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:121)
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$ModalContextThread.run(ModalContext.java:113)

Discussion

  • Fabio Zadrozny
    Fabio Zadrozny
    2008-02-05

    Logged In: YES
    user_id=617340
    Originator: YES

    Fixed for 1.3.14

     
  • Fabio Zadrozny
    Fabio Zadrozny
    2008-02-05

    • status: open --> closed-fixed