Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » how to "dynamically" load different images for nodes ?
how to "dynamically" load different images for nodes ? [message #1811321] Fri, 30 August 2019 14:09
Eclipse UserFriend
I am trying to load different images of nodes without previously defining them as classes or enumeration of the node in the EMF Model but only as an attribute "nodeImage".

The nodeImages would be put in a separate folder at runtime.

The "nodeImage" attribute indicates wich image should be assigned to wich node but I have to read it from a generated EMF file first to be able to statically assign a value to the desired GMF node before initializing the diagram file.

Editing the "NodeEditPart" in my *.diagram after defining a costum figure in the *.gmfgraph sets a standard image for all the nodes. Since the "NodeEditPart" is extending AbstractBorderedShapeEditPart I can not define the "nodeImage" as input for the method createNodeShape().

Is there any workaround? or the images have to be explicitly declared in the EMF model? Thank you!
Previous Topic:GMF palatte drag and drop is not working in MAC OS with sudo permissions
Next Topic:DocumentProvider::createElementInfo does not handle IFileEditorInput
Goto Forum:
  


Current Time: Wed Jul 16 05:21:21 EDT 2025

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

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

Back to the top