Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » "Reloading" the visual part of an editor?
"Reloading" the visual part of an editor? [message #79367] Tue, 21 November 2006 10:41
Eclipse UserFriend
Originally posted by: christian.daenekas.informatik.uni-oldenburg.de

Hi,

I wrote an audit containing a constraint that detects cycles in my
editors graphs. I also managed to change the color of the elements that
a part of the cycle to red. I did this by getting the Editpart for a
node or connection and altering the foregroundcolor like this:

List<ProbeEditPart> editparts =
diagram.getDiagramGraphicalViewer().findEditPartsForElement( EMFCoreUtil.getProxyID(p),
ProbeEditPart.class);
editparts.get(0).getFigure().setForegroundColor(DiagramColor Constants.red);

(The Object p is an instance of my probe class, which is defined in my
ecore model. )

Now when I delete a connection or a node that causes a cycle I want the
colors set back to normal as it happens when I reopen the diagram file.
Is there some method to call that produces this effect, so that I don´t
have to change back the foregroundcolor for each element manually?

Greetings,
Christian
Previous Topic:Different files for model and diagram problenm
Next Topic:org.eclipse.emf.codegen.jet.JETException: InvocationTargetException for BMPM Tutorial
Goto Forum:
  


Current Time: Tue Apr 29 02:43:58 EDT 2025

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

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

Back to the top