Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How can I set one of the pages of multipage editor as GEF page?
How can I set one of the pages of multipage editor as GEF page? [message #57206] Wed, 22 January 2003 19:26 Go to next message
Eclipse UserFriend
Originally posted by: aithu.hotmail.com

How can I set one of the pages of multipage editor as GEF page?

void createPage4()
{
Canvas canvas = new Canvas(getContainer(), SWT.NONE | SWT.NO_BACKGROUND);
FillLayout layout = new FillLayout();
canvas.setLayout(layout);


LightweightSystem lws = new LightweightSystem(canvas);
IFigure figure = new Figure();
lws.setContents(figure);

//Here, I want to add the GEF page

}

thanks
aithu
Re: How can I set one of the pages of multipage editor as GEF page? [message #57230 is a reply to message #57206] Wed, 22 January 2003 20:11 Go to previous messageGo to next message
Eric Bordeau is currently offline Eric BordeauFriend
Messages: 259
Registered: July 2009
Senior Member
I think you would just call addPage(canvas)? That would put your canvas on that page and the
lightweight system would be associated with that canvas.

Eric


Aithu wrote:
> How can I set one of the pages of multipage editor as GEF page?
>
> void createPage4()
> {
> Canvas canvas = new Canvas(getContainer(), SWT.NONE | SWT.NO_BACKGROUND);
> FillLayout layout = new FillLayout();
> canvas.setLayout(layout);
>
>
> LightweightSystem lws = new LightweightSystem(canvas);
> IFigure figure = new Figure();
> lws.setContents(figure);
>
> //Here, I want to add the GEF page
>
> }
>
> thanks
> aithu
>
Re: How can I set one of the pages of multipage editor as GEF page? [message #57257 is a reply to message #57230] Wed, 22 January 2003 20:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: aithu.hotmail.com

I want to add a gef page similar to the one in logic editor example. So,
how can i do that.

thanks
Re: How can I set one of the pages of multipage editor as GEF page? [message #57283 is a reply to message #57257] Wed, 22 January 2003 20:41 Go to previous messageGo to next message
Eric Bordeau is currently offline Eric BordeauFriend
Messages: 259
Registered: July 2009
Senior Member
There's also an addPage(IEditorPart, IEditorInput) method in MultiPageEditorPart. You can create a
new GraphicalEditor (i.e. LogicEditor) and set it as one of the pages. You can just use
getEditorInput() for the second parameter.

Eric


Aithu wrote:
> I want to add a gef page similar to the one in logic editor example. So,
> how can i do that.
>
> thanks
>
Re: How can I set one of the pages of multipage editor as GEF page? [message #57334 is a reply to message #57283] Wed, 22 January 2003 21:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: aithu.hotmail.com

Hi Eric,

Thanks for your quick reply.

I tried the following code:
int index = addPage(new LogicEditor(),getEditorInput());

But, I get the error: "Unhandled exception type
org.eclipse.ui.PartInitException"

What is the problem.

thanks,
aithu
Re: How can I set one of the pages of multipage editor as GEF page? [message #58316 is a reply to message #57334] Mon, 27 January 2003 16:09 Go to previous message
Eclipse UserFriend
Originally posted by: hudsonr.us.i_b_m.com

Are you doing this from within the Logic Plugin?

If you have your own plugin that is trying to reuse the Logic Plugin, then I
would gues that the problem is that the Logic Example does NOT export its
classes, so new LogicEditor() will cause a ClassNotFoundException.

Look at the .log file in the META area in the runtime workspace.

"Aithu" <aithu@hotmail.com> wrote in message
news:b0n0q6$c4$1@rogue.oti.com...
> Hi Eric,
>
> Thanks for your quick reply.
>
> I tried the following code:
> int index = addPage(new LogicEditor(),getEditorInput());
>
> But, I get the error: "Unhandled exception type
> org.eclipse.ui.PartInitException"
>
> What is the problem.
>
> thanks,
> aithu
>
>
Previous Topic:Simple Examples and a Mouse Listener
Next Topic:Direct Edit in GEF
Goto Forum:
  


Current Time: Sat Oct 19 13:20:29 GMT 2024

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

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

Back to the top