Project: mulestudio
Issue STUDIO-2888: Problem saving after project move
Steps to reproduce: 1.- Install eGit plugin 2.- Create a project 3.- Right clic on it, Team > Share Project 4.- Create a git repository and share the project 5.- Make a modification in the project and then Save Issue: the followed NPE is raised. {code} java.lang.NullPointerException org.eclipse.wst.sse.ui.StructuredTextEditor.updateEncodingMemento(StructuredTextEditor.java:3192) org.eclipse.wst.sse.ui.StructuredTextEditor.doSave(StructuredTextEditor.java:1897) org.mule.tooling.messageflow.editor.MultiPageMessageFlowEditor.doSave(MultiPageMessageFlowEditor.java:718) org.eclipse.ui.internal.SaveableHelper$2.run(SaveableHelper.java:151) org.eclipse.ui.internal.SaveableHelper$5.run(SaveableHelper.java:277) org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464) org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372) org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759) org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756) org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2649) org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:285) org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:264) org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:156) org.eclipse.ui.internal.EditorManager.savePart(EditorManager.java:1399) org.eclipse.ui.internal.WorkbenchPage.savePart(WorkbenchPage.java:3420) org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3433) org.eclipse.ui.internal.handlers.SaveHandler.execute(SaveHandler.java:54) org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290) org.eclipse.core.commands.Command.executeWithChecks(Command.java:499) org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468) org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786) org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885) org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567) org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508) org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123) org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) org.eclipse.swt.widgets.Display.filterEvent(Display.java:1072) org.eclipse.swt.widgets.Display.sendEvent(Display.java:4133) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466) org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1495) org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1491) org.eclipse.swt.widgets.Table.sendKeyEvent(Table.java:3064) org.eclipse.swt.widgets.Control.keyDown(Control.java:2371) org.eclipse.swt.widgets.Composite.keyDown(Composite.java:600) org.eclipse.swt.widgets.Table.keyDown(Table.java:1920) org.eclipse.swt.widgets.Display.windowProc(Display.java:5495) org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method) org.eclipse.swt.widgets.Widget.callSuper(Widget.java:221) org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2102) org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2299) org.eclipse.swt.widgets.Display.windowProc(Display.java:5557) org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method) org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5002) org.eclipse.swt.widgets.Display.applicationProc(Display.java:5151) org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method) org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:128) org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3616) org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701) org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665) org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499) org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679) org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668) org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629) org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) org.eclipse.equinox.launcher.Main.run(Main.java:1438) {code}
Story points: 8