Refreshing Decorations [message #65722] |
Thu, 19 October 2006 15:41 |
Eclipse User |
|
|
|
Originally posted by: john.campaner.s1.com
I have an action which converts a node on my diagram from a regular model
node to a shortcut.
This action relocates the underlying EMF model object to a different
resource then makes the annotation on the diagram view object to identify it
as a shortcut (in the same way the create shortcut action does).
Everything works great except I have to close the diagram and reopen it to
see the shortcut decoration showup on the node which has been converted.
Any suggestions on how I can force the redecoration of a node? I tried
refresh, activating, deactivating then activating again. None of that
worked.
Thanks
John
|
|
|
|
Re: Refreshing Decorations [message #65887 is a reply to message #65744] |
Thu, 19 October 2006 21:35 |
Eclipse User |
|
|
|
Originally posted by: john.campaner.s1.com
Hi,
I set the breakpoints as requrested.
I'm not too experienced with GMF but what it looks like the issue may be
that the shortcuts decorator is not installed on the EditPart in question
(which makes total sense as the node was not a shortcut when it was
originally created...it only became a shortcut after creation).
Even if I somehow install the decorator, the refresh() method on Shortcuts
decorator says:
public void refresh() {
removeDecoration();
}
Which removes any decorations on the target
Any recommendation on how best to resolve these issues?
"Alex Shatalin" <vano@borland.com> wrote in message
news:cd695fb3122fb8c8c1c850464fbf@news.eclipse.org...
> Hello John,
>
> Can you put a breakpoint into the generated ShortcutsDecoratorProvider and
> ensure that corresponding methods will be called after your attempts to
> reefresh editor + required annotation was created correctly on the correct
> instance of View.
>
> -----------------
> Alex Shatalin
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03334 seconds