Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to use GEF in RCP.
How to use GEF in RCP. [message #235237] Thu, 07 June 2007 10:17 Go to next message
Eclipse UserFriend
Originally posted by: chaitannyam.yahoo.co.uk

Hello everyone....

I wanted to use GEF in my RCP application and there was this link which showed how to do this.. but i couldn't figure out what the auther wanted to say ...

<b>"The conversion of the shapes example into an RCP-based application is a lot simpler than most people think. The problem stems from the setInput method of ShapesEditor expecting an IEditorInput, but the most familiar editor input people work with is IFileEditorInput. The problem with IFileEditorInput is that it belongs to the pesky org.eclipse.ui.ide plugin which is not an acceptable dependency for an RCP-based application. The solution to this problem is to simply create our own editor input, ShapesEditorInput which implements the IEditorInput interface via IPathEditorInput interface. Once this change is completed and the setInput method is properly changed in ShapesEditor to use ShapesEditorInput, we can now properly open a shapes editor. Note, the sole purpose of this example is to demonstrate how to get a GEF editor inside of an RCP application, it doesn't include support for various actions such as saving or wizards (I leave this for the reader to explore).

"</b>

Here is the link www.eclipse.org/articles/Article-GEF-EMF/gef-emf.html

Anyways if anyone knows how to do it... please let me know the procedure.
Re: How to use GEF in RCP. [message #235360 is a reply to message #235237] Mon, 11 June 2007 12:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: apexgroup07.gmail.com

What is the problem you are facing?
Re: How to use GEF in RCP. [message #235373 is a reply to message #235360] Mon, 11 June 2007 13:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chaitannyam.yahoo.co.uk

hi rohit,
i want to embede the gef application to my self made rcp application.how can i add it.
Re: How to use GEF in RCP. [message #235380 is a reply to message #235360] Mon, 11 June 2007 13:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chaitannyam.yahoo.co.uk

hi rohit,
i want to embede the gef application to my self made rcp application.how can i add it.
Re: How to use GEF in RCP. [message #235386 is a reply to message #235380] Mon, 11 June 2007 14:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: apexgroup07.gmail.com

Hello,

1. Enable the editor in your perspective class using: layout.setEditorAreaVisible(true);

2. The entry of editor should be there in the plugin.xml.

3. Now you can open the editor using

PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().openEditor(editorInput, "ID");

Here you need to create editor input class for your self. you can do it by extending IStorageEditorInput class.

The same editor input you will get in the protected void setInput(IEditorInput input) method of your editor. Here you can extract your desired information from the input and set into the editor.

It is not a difficult task. once you will try it will take only 5-10 min to do it.

Regards
Rohit
Re: How to use GEF in RCP. [message #235449 is a reply to message #235237] Tue, 12 June 2007 14:58 Go to previous message
Anthony Hunter is currently offline Anthony HunterFriend
Messages: 446
Registered: July 2009
Senior Member
Hi Chaitannya,

Check out the first Directed Graph Example (Digraph1) at
http://www.eclipse.org/gef/reference/digraph1.php#Digraph1Ap plication

Cheers...
Anthony

"chaitannya" <chaitannyam@yahoo.co.uk> wrote in message
news:719473005.1841181211492609.JavaMail.root@cp9.dzone.com...
> Hello everyone....
>
> I wanted to use GEF in my RCP application and there was this link which
> showed how to do this.. but i couldn't figure out what the auther wanted
> to say ...
>
> <b>"The conversion of the shapes example into an RCP-based application is
> a lot simpler than most people think. The problem stems from the setInput
> method of ShapesEditor expecting an IEditorInput, but the most familiar
> editor input people work with is IFileEditorInput. The problem with
> IFileEditorInput is that it belongs to the pesky org.eclipse.ui.ide plugin
> which is not an acceptable dependency for an RCP-based application. The
> solution to this problem is to simply create our own editor input,
> ShapesEditorInput which implements the IEditorInput interface via
> IPathEditorInput interface. Once this change is completed and the setInput
> method is properly changed in ShapesEditor to use ShapesEditorInput, we
> can now properly open a shapes editor. Note, the sole purpose of this
> example is to demonstrate how to get a GEF editor inside of an RCP
> application, it doesn't include support for various actions such as saving
> or wizards (I leave this for the reader to explore).
>
> "</b>
>
> Here is the link www.eclipse.org/articles/Article-GEF-EMF/gef-emf.html
>
> Anyways if anyone knows how to do it... please let me know the procedure.
Previous Topic:Get the size of my plugin's view
Next Topic:Automatically creating additional shapes on a drop from the pallete
Goto Forum:
  


Current Time: Fri Aug 19 03:09:38 GMT 2022

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

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

Back to the top