Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Add a GEF figures to the Multi page editor
Add a GEF figures to the Multi page editor [message #243285] Fri, 30 May 2008 17:12 Go to next message
Eclipse UserFriend
Originally posted by: npchala.yahoo.com

Hi,

I am new to GEF and i'm using GEF 3.3 and Eclipse 3.3.

According to a model i managed to draw a set of figures. Now i need to
show that figures on the first page of a multi page Editor. The GEF model
seperately work fine and it initialy calls the,

public class Digraph1GraphicalEditor extends GraphicalEditor {
....................
}

class,

For the multi page editor i used 'plugin with a multi-page editor' example
available under eclipse. This initialy calls the,

public class MultiPageEditor extends MultiPageEditorPart implements
IResourceChangeListener{
........................
}

class.

I need to show the figures that i drew by using the GEF in the first page
of the multi page editor. But i found that simply creating an object of
the Digraph1GraphicalEditor and calls the configureGraphicalViewer()
method of that class wont work fine.

So if anybody could please let me know how to proceed with this?

The first page in the multi-page example is a normal text editor, and the
page was simply added by using,

int index = addPage(editor, getEditorInput());

So how to add the above GEF figures to the Editor is my second question?

Thanks in Advance,
Chalani
Re: Add a GEF figures to the Multi page editor [message #243290 is a reply to message #243285] Sat, 31 May 2008 06:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rashi.bahal.gmail.com

Hi
Jst create an object of ur editor class in the createPage0() and pass that to the addPage method.
Rest all will remain the same.

Well thanks for ur earlier code. It helped me. But still i m having some focus setting problem in that.
Re: Add a GEF figures to the Multi page editor [message #243294 is a reply to message #243290] Sat, 31 May 2008 08:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: npchala.yahoo.com

Hi,

Thnakx for your help, but when trying to pass the editor class object to
the addPage it gives an error as,

'The method addPage(control) in the MultiPageEditorPart is not applicable
for the arguments Digraph1GraphicalEditor'

How can i solve this?

Thnakx in advace,
Chalani
Re: Add a GEF figures to the Multi page editor [message #243298 is a reply to message #243290] Sat, 31 May 2008 08:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rashi.bahal.gmail.com

Hi
Have u made the editorInput that implements IFileEditorInput.
And then do something like this;

void createPage0() {
try {
vocabEditor = new VocabularyEditor();
int index = addPage(vocabEditor, getEditorInput());
setPageText(index, "Vocab Editor");
} catch (PartInitException e) {
ErrorDialog.openError(
getSite().getShell(),
"Error creating nested text editor",
null,
e.getStatus());
}
}
Re: Add a GEF figures to the Multi page editor [message #243303 is a reply to message #243298] Sat, 31 May 2008 14:31 Go to previous message
Eclipse UserFriend
Originally posted by: npchala.yahoo.com

Hi,

Thankx very much for your sample code. It worked fine. And the out put was
also as i expected, but there was an internal error saying,

"a stack overflow error has occurred. you are recommended to exit the
workbench. subsequent errors may happen and may terminate the workbench
without warning."

when click 'No' to avoid the closing of the workbech, it returns a
"Unhandled event loop exception, Reason: java.lang.StackOverflowError"

This error only appears when integrating with the multip page editor, GEF
application alone works fine.

This may not have anything to do with the GEF, but i like to know if you
know a method to overcome this error,

thanks in advance,

Chalani
Previous Topic:Enable/Disable of Palette-Tools
Next Topic:What's up with Zest?
Goto Forum:
  


Current Time: Tue Mar 19 08:10:57 GMT 2024

Powered by FUDForum. Page generated in 0.01854 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top