Project: JDT
Bug 26382 Exception renaming source folder [refactoring]
Reported: 2002-11-14 13:38:59 | Status: resolved fixed

Build 20021113 Linux-GTK In the packages view, I right clicked on a source folder and choose "Refactor->Rename" and renamed my plug-in's only source folder from "src-editorlist" to "src". A dialog popped up many times: Title: Reorganize Message: Unexpected exception. See log for details Reason: src-editorlist [in EditorList] does not exist Many exceptions were written to my log (471K worth), but they all top stack frames were the same. The following is the first trace that appears in the log: !SESSION Nov 14, 2002 12:40:29.521 --------------------------------------------- java.version=1.3.1_03 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US Command-line arguments: -os linux -ws gtk -arch x86 -debug -dev bin -data /home/jburns/target -install file:/home/jburns/host/eclipse/ !ENTRY org.eclipse.jdt.ui 4 1 Nov 14, 2002 12:40:29.522 !MESSAGE Internal Error !STACK 1 Java Model Exception: Java Model Status [src-editorlist [in EditorList] does not exist.] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException(JavaElement.java:488) at org.eclipse.jdt.internal.core.PackageFragmentRoot.openWhenClosed(PackageFragmentRoot.java:368) at org.eclipse.jdt.internal.core.JavaElement.openHierarchy(JavaElement.java:509) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:296) at org.eclipse.jdt.internal.core.PackageFragmentRoot.getKind(PackageFragmentRoot.java:207) at org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgRefactoring.isSourceFolder(ReorgRefactoring.java:627) at org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgRefactoring.hasSourceFolders(ReorgRefactoring.java:315) at org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgRefactoring.checkActivation(ReorgRefactoring.java:88) at org.eclipse.jdt.internal.ui.reorg.ClipboardActionUtil.canActivate(ClipboardActionUtil.java:125) at org.eclipse.jdt.internal.ui.reorg.ReorgDestinationAction.canOperateOn(ReorgDestinationAction.java:74) at org.eclipse.jdt.internal.ui.reorg.JdtMoveAction.canOperateOn(JdtMoveAction.java:59) at org.eclipse.jdt.internal.ui.reorg.ReorgDestinationAction.selectionChanged(ReorgDestinationAction.java:70) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged(SelectionDispatchAction.java:181) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.selectionChanged(SelectionDispatchAction.java:176) at org.eclipse.jdt.ui.actions.MoveAction.selectionChanged(MoveAction.java:76) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1151) at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:540) at org.eclipse.jface.viewers.StructuredViewer$1.widgetSelected(StructuredViewer.java:564) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:172) at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:167) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:302) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:839) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1464) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1284) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1419) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1402) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:831) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539)

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgRefactoring.java