Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to delete the view without element instantly?
How to delete the view without element instantly? [message #29153] Thu, 24 August 2006 12:59 Go to next message
Eclipse UserFriend
Originally posted by: dzhpingbo.sohu.com

I use the synchronize function in gmfgen.
I know canonical behavior means the View will exist only if the semantic
element (model element) exist, but the view was not deleted as soon as
the semantic element is gone.
It remains in the diagram until I use palette tool to create another view on
the Editor.
How can I delete the view instantly?
Is it means that if the editor was refreshed and the view without element
will gone. If so , how can I refresh the Editor?



  • Attachment: error.JPG
    (Size: 14.19KB, Downloaded 108 times)
Re: How to delete the view without element instantly? [message #29192 is a reply to message #29153] Thu, 24 August 2006 13:38 Go to previous messageGo to next message
Eclipse UserFriend
dzh wrote:
> I use the synchronize function in gmfgen.
> I know canonical behavior means the View will exist only if the semantic
> element (model element) exist, but the view was not deleted as soon as
> the semantic element is gone.
> It remains in the diagram until I use palette tool to create another view on
> the Editor.
> How can I delete the view instantly?
> Is it means that if the editor was refreshed and the view without element
> will gone. If so , how can I refresh the Editor?
>
>
>
>
You will need to check that your canonical edit policy is refreshing
when you delete the semantic element, which does not seem to be the case
based on what you are describing here, the canonical edit policy listen
by default to the host's semantic element so it should receive the
delete event and refresh
One way to debug this is to add a break point to
CanonicalEditPolicy#handleNotificationEvent and check if it get called
or not when you delete the element, and if it get called make sure that
shouldHandleNotificationEvent(event) is returning true other wise the
event will be skipped.
Re: How to delete the view without element instantly? [message #29341 is a reply to message #29153] Thu, 24 August 2006 15:04 Go to previous messageGo to next message
Eclipse UserFriend
Hello dzh,

Try to reopen the editor. If the view will be removed, you have to call refresh
manually (search for it in a newsgroup).

-----------------
Alex Shatalin
Re: How to delete the view without element instantly? [message #30801 is a reply to message #29192] Fri, 25 August 2006 13:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dzhpingbo.sohu.com

"Mohammed Mostafa" <mmostafa@ca.ibm.com>
??????:ecko65$553$1@utils.eclipse.org...

> You will need to check that your canonical edit policy is refreshing when
> you delete the semantic element, which does not seem to be the case based
> on what you are describing here, the canonical edit policy listen by
> default to the host's semantic element so it should receive the delete
> event and refresh
yes, it did so in the same Editor, but when the original view and shortcut
in different editors, it does not refresh.
> delete event and refresh
> One way to debug this is to add a break point to
> CanonicalEditPolicy#handleNotificationEvent and check if it get called or
> not when you delete the element, and if it get called make sure that
> shouldHandleNotificationEvent(event) is returning true other wise the
> event will be skipped.
Re: How to delete the view without element instantly? [message #43416 is a reply to message #29341] Sat, 09 September 2006 02:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dzhpingbo.sohu.com

Could you please tell me which to refresh, I use
ProcessDiagramEditPart.refresh(), and debug through it . Finally, I found
that it did not refresh views, so, would you please tell me which one I
should refresh? call the refresh method?
"Alex Shatalin" <vano@borland.com> д
Re: How to delete the view without element instantly? [message #44661 is a reply to message #43416] Mon, 11 September 2006 06:56 Go to previous message
Eclipse UserFriend
Hello dzh,

> ProcessDiagramEditPart.refresh(), and debug through it . Finally, I
> found that it did not refresh views, so, would you please tell me which one
ProcessDiagramCanonicalEditPolicy should be generated in addition. This EditPolicy
is responsible for updating the diagram. I suggest you to call “refresh”
method of this EdtiPolicy. This method will be automatically called on opening
editor from the “activate” method of this Editpolicy.

-----------------
Alex Shatalin
Previous Topic:How to delete shortcut with no element exists instantly when switch editors
Next Topic:Plate figure of an editpart
Goto Forum:
  


Current Time: Wed Jul 23 14:08:48 EDT 2025

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

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

Back to the top