Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Creating views without a running Platform
Creating views without a running Platform [message #218227] Tue, 10 February 2009 18:04 Go to next message
Eclipse UserFriend
Originally posted by: c.krause.cwi.nl

Hi,
I'm using EMF/GMF models outside of Eclipse which works nicely and only
requires a couple plug-ins in the class path. Usually these are enough:

* Eclipse core runtime:
o org.eclipse.core.expressions
o org.eclipse.core.resources
o org.eclipse.core.runtime
o org.eclipse.equinox.common

* EMF Ecore model:
o org.eclipse.emf.ecore
o org.eclipse.emf.ecore.xmi
o org.eclipse.emf.common

* GMF Notation model:
o org.eclipse.gmf.runtime.emf.type.core
o org.eclipse.gmf.runtime.notation

With this I can read and modify my domain model and also load the
diagram information. Now, I would like to be able to create views as
well. So what I want to use is the generated View factories in my GMF
editor. These, on the other hand require the visual IDs which are stored
in the edit parts and this is where I get into trouble.

For instance, in:
org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditP art. <clinit>(ConnectionEditPart.java:233)

you find this code:

/**
* Register the adapters for the standard properties.
*/
static {
registerAdapters();
}

and here my neat little application crashes because it needs a properly
configured and running org.eclipse.core.runtime.Platform instance, which
I don't and I actually don't want to have.

So I was wondering why the visual IDs and the view factories are so
tightly coupled with the edit part and the GEF code. Wouldn't it be
nicer to separate the things a bit more? Or is there another way of
doing these sorts of things?

Cheers,
Christian
Re: Creating views without a running Platform [message #218250 is a reply to message #218227] Wed, 11 February 2009 11:08 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Christian,

> and here my neat little application crashes because it needs a
> properly configured and running org.eclipse.core.runtime.Platform
> instance, which I don't and I actually don't want to have.
Well, currently it’s very hard to get rid of oe.core.runtime.Platform. On
the other side I do not see the reason of executing an application without
the Platform.. I think all you need is an RCP application. This application
can be very lightweight keeping all the necessary Platform services executed.
So, I suggest you to stick to RCP application. In addition if you need some
more plugins (like: resources) then you can end up with RCP + Resources platform.

-----------------
Alex Shatalin
Re: Creating views without a running Platform [message #218292 is a reply to message #218250] Wed, 11 February 2009 15:07 Go to previous message
Eclipse UserFriend
Originally posted by: c.krause.cwi.nl

Hi Alex,
thank you for your answers. I was hoping to not have to go that way, but
I guess I have no other choice. Thanks anyway.

Christian

Alex Shatalin wrote:
> Hello Christian,
>
>> and here my neat little application crashes because it needs a
>> properly configured and running org.eclipse.core.runtime.Platform
>> instance, which I don't and I actually don't want to have.
> Well, currently it’s very hard to get rid of oe.core.runtime.Platform.
> On the other side I do not see the reason of executing an application
> without the Platform.. I think all you need is an RCP application. This
> application can be very lightweight keeping all the necessary Platform
> services executed. So, I suggest you to stick to RCP application. In
> addition if you need some more plugins (like: resources) then you can
> end up with RCP + Resources platform.
>
> -----------------
> Alex Shatalin
>
>
Previous Topic:Retrieve graphical element from model element
Next Topic:Palette Icons
Goto Forum:
  


Current Time: Sat Nov 09 02:37:23 GMT 2024

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

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

Back to the top