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] Tue, 05 September 2006 23:10
Eclipse User
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: Tue Jul 29 17:00:43 EDT 2014

Powered by FUDForum. Page generated in 0.01814 seconds