Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » how can I use a dynamic EMF model as components in PaletteDrawer?
how can I use a dynamic EMF model as components in PaletteDrawer? [message #222670] Wed, 06 September 2006 03:10
Eclipse UserFriend
Originally posted by: qianjun.wang.hotmail.com

Hi,
I use dynamic EMF to build a Model in-Memory.

I want to use his model in GEF as components im PaletteDrawer.

Could you tell me, how to do it.

for exsample, in Shape Project-ShapesEditorPaletteFactory.jave

------------------------------------------------------------ ----------------
-------------
............

PaletteDrawer componentsDrawer = new PaletteDrawer("Components");

CombinedTemplateCreationEntry component = new
CombinedTemplateCreationEntry(
"3DScanner",
"Add a 3DScanner",
Scanner.class,
~~~~~~~~~~~~~~~~~~
new SimpleFactory(Scanner.class),
~~~~~~~~~~~~~~~~~~

ImageDescriptor.createFromFile(ShapesPlugin.class,
"icons/ellipse16.gif"),
ImageDescriptor.createFromFile(ShapesPlugin.class,
"icons/ellipse24.gif"));

componentsDrawer.add(component);
........
------------------------------------------------------------ ----------------
-----------------


I have a dynamic class Eclass for Scanner in memory, but not a static
Scanner.class.
Previous Topic:Refresh Label of a Shape (Extended ShapeExample)
Next Topic:Right-justified layout
Goto Forum:
  


Current Time: Sun Dec 21 06:58:57 GMT 2014

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

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