"Reloading" the visual part of an editor? [message #79367] |
Tue, 21 November 2006 10:41 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.07411 seconds