Extract Method does not work

Discuss all problems you have with Servoy here. It might help to mention the Servoy version and Operating System version you are using

Extract Method does not work

Postby tkilshaw1553613063 » Tue Mar 26, 2019 6:12 pm

I'm using the Community Edition Version: 8.4.0.3402 on Windows 10.

Any attempt to use the context menu Refactor/Extract Method... on any JavaScript code produces the following error:

---
An unexpected exception occurred during condition checking. See the error log for more details.

org/eclipse/ltk/internal/core/refactoring/Resources
---

The error log, shown below, implies that there is a missing class, if I read it right.

Is this supposed to work?

Is there a fix for it?

thanks,

Terry

!ENTRY org.eclipse.ltk.ui.refactoring 4 10000 2019-03-26 09:08:07.481
!MESSAGE Internal Error
!STACK 0
java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:398)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:471)
at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:237)
at org.eclipse.ui.internal.progress.ProgressManager.lambda$25(ProgressManager.java:820)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:71)
at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:853)
at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:829)
at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.checkInitialConditions(RefactoringWizardOpenOperation.java:222)
at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.access$1(RefactoringWizardOpenOperation.java:217)
at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run(RefactoringWizardOpenOperation.java:172)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:71)
at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:209)
at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:123)
at org.eclipse.dltk.internal.ui.refactoring.actions.RefactoringStarter.activate(RefactoringStarter.java:36)
at org.eclipse.dltk.javascript.ui.actions.ExtractMethodAction.run(ExtractMethodAction.java:81)
at org.eclipse.dltk.internal.ui.actions.refactoring.ContributedRefactoringAction.run(ContributedRefactoringAction.java:34)
at org.eclipse.dltk.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:209)
at org.eclipse.dltk.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:263)
at org.eclipse.dltk.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:235)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4118)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3931)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3534)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1170)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1059)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:667)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:597)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
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:656)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:592)
at org.eclipse.equinox.launcher.Main.run(Main.java:1498)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/ltk/internal/core/refactoring/Resources
at org.eclipse.dltk.core.manipulation.RefactoringChecks.validateModifiesFiles(RefactoringChecks.java:30)
at org.eclipse.dltk.internal.javascript.corext.refactoring.code.ExtractMethodRefactoring.checkInitialConditions(ExtractMethodRefactoring.java:229)
at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:81)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2289)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2316)
at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:86)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Root exception:
java.lang.NoClassDefFoundError: org/eclipse/ltk/internal/core/refactoring/Resources
at org.eclipse.dltk.core.manipulation.RefactoringChecks.validateModifiesFiles(RefactoringChecks.java:30)
at org.eclipse.dltk.internal.javascript.corext.refactoring.code.ExtractMethodRefactoring.checkInitialConditions(ExtractMethodRefactoring.java:229)
at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:81)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2289)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2316)
at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:86)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
tkilshaw1553613063
 
Posts: 18
Joined: Tue Mar 26, 2019 5:11 pm

Re: Extract Method does not work

Postby Joas » Tue Mar 26, 2019 6:59 pm

There is indeed a problem with extracting methods in 8.4.

I just tried it in 2019.03 and there it works as expected again.
Joas de Haan
Yield Software Development: Need help on your project?
yieldsd.com
User avatar
Joas
Site Admin
 
Posts: 833
Joined: Mon Mar 20, 2006 4:07 pm
Location: Leusden, NL


Return to Discuss possible Issues and Bugs

Who is online

Users browsing this forum: No registered users and 7 guests

cron