Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » error GraphicalEditor.doSave
error GraphicalEditor.doSave [message #228255] Mon, 18 December 2006 16:03 Go to next message
Jeff Higgins is currently offline Jeff Higgins
Messages: 40
Registered: July 2009
Member
Hi,
newbie question.
I try to save my model in my
GraphicalEditorWithFlyoutPalette's
doSave method. (see below)

Messagebox displays Save All Failed:null

InvocationTargetException thrown from
org.eclipse.jface.operation.ModalContext.runInCurrentThread
(org.eclipse.jface.operation.IRunnableWithProgress,
org.eclipse.core.runtime.IProgressMonitor)
(see below)
IProgressMonitor (or something inside it) must be null,
but I can see the value of
progressMonitor StatusLineManager$1 (id=82)
in variable view

I guess I'm not doing something with IProgressMonitor
that needs to be done but I don't know what that
might be.

Will someone point me in the right direction?

Thanks,
Jeff Higgins

p.s this is an RCP application derived from
GEF Shapes-RCP example.



public void doSave(IProgressMonitor monitor) {
try {
FileOutputStream out = new FileOutputStream(
((PathEditorInput)this.getEditorInput())
.getPath().toPortableString());

XMLObjectWriter writer = XMLObjectWriter.newInstance(out);
writer.setIndentation("\t");
writer.write(this.graph, "graph", Graph.class);
writer.close();

} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (XMLStreamException e) {
e.printStackTrace();
}
}

org.eclipse.jface.operation.ModalContext.runInCurrentThread( org.eclipse.jface.operation.IRunnableWithProgress,
org.eclipse.core.runtime.IProgressMonitor) line: 381
org.eclipse.jface.operation.ModalContext.run(org.eclipse.jfa ce.operation.IRunnableWithProgress,
boolean, org.eclipse.core.runtime.IProgressMonitor,
org.eclipse.swt.widgets.Display) line: 313
org.eclipse.jface.window.ApplicationWindow$1.run() line: 763
org.eclipse.swt.custom.BusyIndicator.showWhile(org.eclipse.s wt.widgets.Display,
java.lang.Runnable) line: 67
org.eclipse.ui.internal.WorkbenchWindow(org.eclipse.jface.wi ndow.ApplicationWindow).run(boolean,
boolean, org.eclipse.jface.operation.IRunnableWithProgress) line: 760
org.eclipse.ui.internal.WorkbenchWindow.run(boolean, boolean,
org.eclipse.jface.operation.IRunnableWithProgress) line: 2283
org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOpe ration(java.lang.String,
org.eclipse.jface.operation.IRunnableWithProgress,
org.eclipse.ui.IWorkbenchWindow) line: 258
org.eclipse.ui.internal.SaveablesList.promptForSaving(java.u til.List,
org.eclipse.ui.IWorkbenchWindow, boolean, boolean) line: 573
org.eclipse.ui.internal.SaveablesList.promptForSavingIfNeces sary(org.eclipse.ui.IWorkbenchWindow,
java.util.Set, java.util.Map, boolean) line: 393
org.eclipse.ui.internal.SaveablesList.preCloseParts(java.uti l.List, boolean,
org.eclipse.ui.IWorkbenchWindow) line: 353
org.eclipse.ui.internal.WorkbenchPage.closeEditors(org.eclip se.ui.IEditorReference[],
boolean) line: 1237
Re: error GraphicalEditor.doSave [message #228279 is a reply to message #228255] Mon, 18 December 2006 16:54 Go to previous message
Jeff Higgins is currently offline Jeff Higgins
Messages: 40
Registered: July 2009
Member
OOPS!
a null field in my model caused the error.
Thanks,
JH

"Jeff Higgins" <oohiggins@yahoo.com> wrote in message
news:em6vmv$4qb$1@utils.eclipse.org...
> Hi,
> newbie question.
> I try to save my model in my
> GraphicalEditorWithFlyoutPalette's
> doSave method. (see below)
>
> Messagebox displays Save All Failed:null
>
> InvocationTargetException thrown from
> org.eclipse.jface.operation.ModalContext.runInCurrentThread
> (org.eclipse.jface.operation.IRunnableWithProgress,
> org.eclipse.core.runtime.IProgressMonitor)
> (see below)
> IProgressMonitor (or something inside it) must be null,
> but I can see the value of
> progressMonitor StatusLineManager$1 (id=82)
> in variable view
>
> I guess I'm not doing something with IProgressMonitor
> that needs to be done but I don't know what that
> might be.
>
> Will someone point me in the right direction?
>
> Thanks,
> Jeff Higgins
>
> p.s this is an RCP application derived from
> GEF Shapes-RCP example.
>
>
>
> public void doSave(IProgressMonitor monitor) {
> try {
> FileOutputStream out = new FileOutputStream(
> ((PathEditorInput)this.getEditorInput())
> .getPath().toPortableString());
>
> XMLObjectWriter writer = XMLObjectWriter.newInstance(out);
> writer.setIndentation("\t");
> writer.write(this.graph, "graph", Graph.class);
> writer.close();
>
> } catch (FileNotFoundException e) {
> e.printStackTrace();
> } catch (XMLStreamException e) {
> e.printStackTrace();
> }
> }
>
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( org.eclipse.jface.operation.IRunnableWithProgress,
> org.eclipse.core.runtime.IProgressMonitor) line: 381
> org.eclipse.jface.operation.ModalContext.run(org.eclipse.jfa ce.operation.IRunnableWithProgress,
> boolean, org.eclipse.core.runtime.IProgressMonitor,
> org.eclipse.swt.widgets.Display) line: 313
> org.eclipse.jface.window.ApplicationWindow$1.run() line: 763
> org.eclipse.swt.custom.BusyIndicator.showWhile(org.eclipse.s wt.widgets.Display,
> java.lang.Runnable) line: 67
> org.eclipse.ui.internal.WorkbenchWindow(org.eclipse.jface.wi ndow.ApplicationWindow).run(boolean,
> boolean, org.eclipse.jface.operation.IRunnableWithProgress) line: 760
> org.eclipse.ui.internal.WorkbenchWindow.run(boolean, boolean,
> org.eclipse.jface.operation.IRunnableWithProgress) line: 2283
> org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOpe ration(java.lang.String,
> org.eclipse.jface.operation.IRunnableWithProgress,
> org.eclipse.ui.IWorkbenchWindow) line: 258
> org.eclipse.ui.internal.SaveablesList.promptForSaving(java.u til.List,
> org.eclipse.ui.IWorkbenchWindow, boolean, boolean) line: 573
> org.eclipse.ui.internal.SaveablesList.promptForSavingIfNeces sary(org.eclipse.ui.IWorkbenchWindow,
> java.util.Set, java.util.Map, boolean) line: 393
> org.eclipse.ui.internal.SaveablesList.preCloseParts(java.uti l.List,
> boolean, org.eclipse.ui.IWorkbenchWindow) line: 353
> org.eclipse.ui.internal.WorkbenchPage.closeEditors(org.eclip se.ui.IEditorReference[],
> boolean) line: 1237
>
>
Previous Topic:getCreateCommand called repeatedly
Next Topic:Thank you GEF
Goto Forum:
  


Current Time: Wed Apr 16 09:34:31 EDT 2014

Powered by FUDForum. Page generated in 0.01765 seconds