Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 260374

Summary: Ctrl+S doesn't work in Java Compare when narrowed down to an element
Product: [Eclipse Project] Platform Reporter: Tomasz Zarna <tomasz.zarna>
Component: CompareAssignee: Tomasz Zarna <tomasz.zarna>
Status: RESOLVED DUPLICATE QA Contact:
Severity: major    
Priority: P3 CC: bokowski, daniel_megert, Szymon.Brandys
Version: 3.5   
Target Milestone: 3.5 M5   
Hardware: All   
OS: All   
Whiteboard:

Description Tomasz Zarna CLA 2009-01-08 06:05:52 EST
N20090107-2000

Using Save action from context menu results in:

org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.core.runtime.OperationCanceledException)
at org.eclipse.swt.SWT.error(SWT.java:3827)
at org.eclipse.swt.SWT.error(SWT.java:3742)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3852)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:333)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:366)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
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:550)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:505)
at org.eclipse.equinox.launcher.Main.run(Main.java:1237)
at org.eclipse.equinox.launcher.Main.main(Main.java:1213)
Caused by: org.eclipse.core.runtime.OperationCanceledException
at org.eclipse.jdt.core.dom.ASTConverter.checkCanceled(ASTConverter.java:402)
at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:2642)
at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1263)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.convert(CompilationUnitResolver.java:256)
at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:933)
at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:657)
at org.eclipse.jdt.internal.ui.compare.JavaStructureCreator.createStructureComparator(JavaStructureCreator.java:294)
at org.eclipse.jdt.internal.ui.compare.JavaStructureCreator.createStructureComparator(JavaStructureCreator.java:253)
at org.eclipse.compare.structuremergeviewer.StructureCreator.internalCreateStructure(StructureCreator.java:102)
at org.eclipse.compare.structuremergeviewer.StructureCreator.access$0(StructureCreator.java:90)
at org.eclipse.compare.structuremergeviewer.StructureCreator$1.run(StructureCreator.java:80)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.compare.internal.Utilities$4.run(Utilities.java:779)
at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:155)
at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:158)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
... 23 more
Comment 1 Dani Megert CLA 2009-01-08 06:10:52 EST
Must be some specific steps. Works for me.
Comment 2 Tomasz Zarna CLA 2009-01-08 06:30:22 EST
The exception thrown when trying to save from the context menu happens each time when in an element.
Comment 3 Dani Megert CLA 2009-01-08 06:39:41 EST
So, is it Ctrl+S or context menu?
Comment 4 Dani Megert CLA 2009-01-08 06:44:55 EST
Context menu works for me as well.
Comment 5 Tomasz Zarna CLA 2009-01-08 06:59:55 EST
(In reply to comment #3)
> So, is it Ctrl+S or context menu?
My bad, should be more specific: first I found a case when hitting Ctrl+S didn't work when in element (summary), then I tried to save using context menu (comment 0). The fact is that I'm no longer able to reproduce the Ctrl+S issue (lost the steps), but the OperationCanceledException is thrown every time when saving from menu and in an element.
Comment 6 Szymon Brandys CLA 2009-01-13 07:36:42 EST
I think that I have steps:

1) Select two java files and Compare With > Each Other them
2) Double click on a node in the structure view
3) Go back to the left/right viewer of the compare editor
4) Modify the content and try Ctrl + S --> id doesn't work
5) Try to save using the context menu --> it works now
Comment 7 Boris Bokowski CLA 2009-01-22 09:08:28 EST
Ctrl+S was not working for me yesterday, will try to come up with reproducible steps.
Comment 8 Dani Megert CLA 2009-01-22 09:12:45 EST
See also bug 261530.
Comment 9 Boris Bokowski CLA 2009-01-22 09:29:02 EST
(In reply to comment #8)
> See also bug 261530.

Thanks for the pointer. I am seeing bug 261530 since there is nothing in the log.
Comment 10 Tomasz Zarna CLA 2009-01-29 08:10:50 EST
After further investigation it appears that the fact that Ctrl+S doesn't work is not related to narrowing to a Java element. The problem is more general and it's already described in bug 261530 => marking as duplicate. As for exception from comment 0, it's also being track, but this time in bug 262557.

*** This bug has been marked as a duplicate of bug 261530 ***