Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Importing new classes at runtime
Importing new classes at runtime [message #152476] Thu, 30 September 2004 16:29 Go to next message
Eclipse UserFriend
Originally posted by: noplrea.y.com

I have several objects is my gef editor's palette that the user can drop in
the diagram and connect them.
What I need to do is to allow the user to dinamically add new objects to the
palette. Previously he/she must setup this object with some "object creation
tool" that will export the results in an XML file that represents the
object's attributes, size, and the gif image it uses to represent itself.

So, basically I need:

1) Know how to translate an XML to java classes to import them to GEF (the
model class and the editpart class)
2) Know how to dinamically link this classes into the palette (maybe I have
to copy them to a directory and then refresh the palette).
3) Know if there's another mechanism to add objets to the palette in
runtime.

Thanks!
George
Re: Importing new classes at runtime [message #154407 is a reply to message #152476] Mon, 18 October 2004 14:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dyx.gmx.net

On Thu, 30 Sep 2004 13:29:05 -0300, Gus <noplrea@y.com> wrote:

> I have several objects is my gef editor's palette that the user can dr=
op =

> in the diagram and connect them.
> What I need to do is to allow the user to dinamically add new objects =
to =

> the palette. Previously he/she must setup this object with some "obje=
ct =

> creation tool" that will export the results in an XML file that =

> represents the
> object's attributes, size, and the gif image it uses to represent itse=
lf.
>
> So, basically I need:
>
> 1) Know how to translate an XML to java classes to import them to GEF =
=

> (the model class and the editpart class)
> 2) Know how to dinamically link this classes into the palette (maybe I=
=

> have to copy them to a directory and then refresh the palette).
> 3) Know if there's another mechanism to add objets to the palette in
> runtime.
>
> Thanks!
> George
>
>

I`ll have to do the same thing and posted a related question about it on=
=

14. Sep.
Here`s a link to the message with some answers, perhaps they help:
http://www.eclipse.org/newsportal/article.php?id=3D8616& group=3Declipse.=
tools.gef
(Can`t get my newsreader to display the message, so I`ve searched the =

webinterface archive)

If you make any further progress please post any insights.

Frank
-- =

Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
Re: Importing new classes at runtime [message #155372 is a reply to message #154407] Sun, 24 October 2004 20:06 Go to previous message
Eclipse UserFriend
Originally posted by: dyx.gmx.net

So, did you make any progress yet, Gus?

I believe the answer to question3 is the easiest.
You can simply add PaletteEntries to the PaletteRoot in runtime with
getPaletteRoot().add(newPaletteEntry);

The newPaletteEntry would have to be created from the XML file somehow.

I`m currently thinking about having a BasicModel class which takes some =
=

properties(an attribute list and a figure) as parameters. Then I can =

instatiate it with different parameters to represent different model =

objects. The parameters would be loaded from the XML.(or in my case rdf)=


Any thoughts?


> On Thu, 30 Sep 2004 13:29:05 -0300, Gus <noplrea@y.com> wrote:
>
>> I have several objects is my gef editor's palette that the user can =

>> drop in the diagram and connect them.
>> What I need to do is to allow the user to dinamically add new objects=
=

>> to the palette. Previously he/she must setup this object with some =

>> "object creation tool" that will export the results in an XML file th=
at =

>> represents the
>> object's attributes, size, and the gif image it uses to represent =

>> itself.
>>
>> So, basically I need:
>>
>> 1) Know how to translate an XML to java classes to import them to GEF=
=

>> (the model class and the editpart class)
>> 2) Know how to dinamically link this classes into the palette (maybe =
I =

>> have to copy them to a directory and then refresh the palette).
>> 3) Know if there's another mechanism to add objets to the palette in
>> runtime.
>>
>> Thanks!
>> George
>>
>>
>
> I`ll have to do the same thing and posted a related question about it =
on =

> 14. Sep.
> Here`s a link to the message with some answers, perhaps they help:
> http://www.eclipse.org/newsportal/article.php?id=3D8616& group=3Declips=
e.tools.gef
> (Can`t get my newsreader to display the message, so I`ve searched the =
=

> webinterface archive)
>
> If you make any further progress please post any insights.
>
> Frank



-- =

Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
Previous Topic:Combined parent-child property descriptors
Next Topic:How to share a commandstack between GEF editor and TextEditor in a multipleEditor?
Goto Forum:
  


Current Time: Thu Jan 16 16:40:31 GMT 2025

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

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

Back to the top