Community
Participate
Working Groups
Create a new file named Bar.java in package foo. type (or paste) in file: <SNIP> package foo; public enum Bar {ONE, TWO, THREE; } </SNIP> attempting to use Copy, or Cut commands subsequently (menu or shortcut) in the file will fail. This is using Eclipse SDK 3.0 with the "Cheetah" update for 1.5 compatability.
Any entries in your log when you do that? Moving to JDT/Text.
How did you update to Cheetah? Is the command disabled?
From Aaron's e-mail: I updated to Cheetah by letting eclipse grab the plug-in from: http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-core-home/update-site The commands were not visibly disabled in the menu; just reported as failing after attempting them.
>just reported as failing after attempting them. How? You did not mention this when filing the bug. Any entries in .log?
(Sorry I would have posted this earlier, I didn't know that eclipse had such a well consealed error log ;p ) Here is the entry each time I do it: !ENTRY org.eclipse.ui 4 4 Jul 20, 2004 11:49:42.863 !MESSAGE The command for the key you pressed failed !ENTRY org.eclipse.ui 4 0 Jul 20, 2004 11:49:42.893 !MESSAGE The command for the key you pressed failed !STACK 0 java.lang.IllegalArgumentException at org.eclipse.jdt.core.dom.ASTNode.setSourceRange(ASTNode.java:2587) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1411) at org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations(ASTConverter.java:311) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1448) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:2462) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1271) at org.eclipse.jdt.core.dom.ASTParser.convert(ASTParser.java:710) at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:681) at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:574) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:441) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:393) at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOperationAction.getClipboardData(ClipboardOperationAction.java:363) at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOperationAction.doCutCopyWithImportsOperation(ClipboardOperationAction.java:300) at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOperationAction.internalDoOperation(ClipboardOperationAction.java:256) at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOperationAction$1.run(ClipboardOperationAction.java:225) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOperationAction.run(ClipboardOperationAction.java:223) at org.eclipse.jface.action.Action.runWithEvent(Action.java:881) at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:141) at org.eclipse.ui.internal.commands.Command.execute(Command.java:132) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:471) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:889) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:930) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:548) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$2(WorkbenchKeyboard.java:496) at org.eclipse.ui.internal.keys.WorkbenchKeyboard$1.handleEvent(WorkbenchKeyboard.java:261) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:740) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:795) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:820) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:805) at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java:1734) at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java:1730) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3067) at org.eclipse.swt.widgets.Control.windowProc(Control.java:2970) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3338) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1467) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2429) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129) 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:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:183) at org.eclipse.core.launcher.Main.run(Main.java:644) at org.eclipse.core.launcher.Main.main(Main.java:628)
Cannot reproduce with latest HEAD contents.
Fixed and released in HEAD. Regression test added.
Verified for 3.1 using build I20050627-1435.