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

Bug 340930

Summary: Saving the plugin fails after undoing an operation
Product: [Eclipse Project] e4 Reporter: Praveen <pinnamur>
Component: UIAssignee: Project Inbox <e4.ui-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard: stalebug

Description Praveen CLA 2011-03-25 02:42:19 EDT
Steps to reproduce :

1) In a plugin.xml, add couple of extension points - for ex., I choose splashHandlers and popupMenus templates.
2) Remove popupMenus extension and then save the file.
3) Undo the operation and saving the file throws Assertion failed error (End Position lies outside document range) with the below exception :

org.eclipse.text.edits.MalformedTreeException: End position lies outside document range
	at org.eclipse.text.edits.TextEditProcessor.checkIntegrityDo(TextEditProcessor.java:178)
	at org.eclipse.text.edits.TextEdit.dispatchCheckIntegrity(TextEdit.java:743)
	at org.eclipse.text.edits.TextEditProcessor.performEdits(TextEditProcessor.java:151)
	at org.eclipse.text.edits.TextEdit.apply(TextEdit.java:711)
	at org.eclipse.text.edits.TextEdit.apply(TextEdit.java:735)
	at org.eclipse.pde.internal.ui.editor.context.InputContext.flushModel(InputContext.java:226)
	at org.eclipse.pde.internal.ui.editor.context.XMLInputContext.flushModel(XMLInputContext.java:464)
	at org.eclipse.pde.internal.ui.editor.context.InputContext.doSave(InputContext.java:187)
	at org.eclipse.pde.internal.ui.editor.context.InputContextManager.save(InputContextManager.java:78)
	at org.eclipse.pde.internal.ui.editor.PDEFormEditor.doSave(PDEFormEditor.java:350)
	at org.eclipse.ui.internal.SaveableHelper$2.run(SaveableHelper.java:151)
	at org.eclipse.ui.internal.SaveableHelper$5.run(SaveableHelper.java:274)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
	at org.eclipse.ui.internal.WorkbenchWindow$8.run(WorkbenchWindow.java:1690)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:1687)
	at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:282)
	at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:261)
	at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:156)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.doSave(CompatibilityPart.java:269)
	at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:226)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:232)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:196)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:86)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.savePart(PartServiceImpl.java:1047)
	at org.eclipse.ui.internal.WorkbenchPage.saveSaveable(WorkbenchPage.java:2870)
	at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:2888)
	at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:76)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:121)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:58)
	at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:226)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:207)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:123)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:122)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:266)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:465)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:515)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:348)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:294)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:76)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1104)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1100)
	at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1509)
	at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4618)
	at org.eclipse.swt.widgets.Tree.WM_CHAR(Tree.java:5890)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4507)
	at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5886)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4946)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2524)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3713)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:842)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:758)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:87)
	at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:542)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:524)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	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:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	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:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Comment 1 Eclipse Genie CLA 2018-10-23 12:04:20 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Lars Vogel CLA 2019-06-05 07:46:08 EDT
This is a mass change to close all e4 bugs marked with "stalebug" whiteboard.

If this bug is still valid, please reopen and remove the "stalebug" keyword.