Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Cannot find some specific classes (problems removing components)
Cannot find some specific classes (problems removing components) [message #84596] Tue, 12 December 2006 07:13 Go to next message
Eclipse UserFriend
Originally posted by: talita.frb.br

Hi!

I've read some emails describing this same problem.
When deleting an component from the diagram, also deletes the respective
view and semantic. If there's any links from/to this component, the
respective view is also deleted, but the semantic stays.

I´ve read something about editing the NotationViewDependentsAdvice and
XXXEditHelper classes but I'm not finding them in the project.

I hope there's someone who can help me.

Thanks, anyway!

^^
Re: Cannot find some specific classes (problems removing components) [message #84887 is a reply to message #84596] Tue, 12 December 2006 13:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vcciubot.uwaterloo.ca

Do it in the EditHelper corresponding to the semantic element you are
removing:

/**
* Gets a command to destroy the connections incident to this block
*/
protected ICommand getDestroyDependentsCommand(
DestroyDependentsRequest request) {
End end = (End) request.getElementToDestroy();

Set ret = new HashSet();
ret.addAll(end.getOutgoingConnections());
ret.addAll(end.getIncomingConnections());

return request.getDestroyDependentsCommand(ret);
}
Re: Cannot find some specific classes (problems removing components) [message #85194 is a reply to message #84887] Wed, 13 December 2006 09:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: julias.frb.br

Hi, Vlad!

I´ve tried this and i've included this method in one EditHelper but,
when debugging, this method is never called.

What can I do?

I tried to find the NotationViewDependentsAdvice, as I've read in some
emails, but it dont exists in the project.

thanks!

Julia






Vlad Ciubotariu wrote:
> Do it in the EditHelper corresponding to the semantic element you are
> removing:
>
> /**
> * Gets a command to destroy the connections incident to this block
> */
> protected ICommand getDestroyDependentsCommand(
> DestroyDependentsRequest request) {
> End end = (End) request.getElementToDestroy();
>
> Set ret = new HashSet();
> ret.addAll(end.getOutgoingConnections());
> ret.addAll(end.getIncomingConnections());
>
> return request.getDestroyDependentsCommand(ret);
> }
>
>
>
Re: Cannot find some specific classes (problems removing components) [message #85266 is a reply to message #85194] Wed, 13 December 2006 12:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vcciubot.uwaterloo.ca

I remember having the same problem with the generated code.

In the generated XXXBaseEditHelper remove this code:

/**
* @generated
*/
protected ICommand getDestroyElementCommand(DestroyElementRequest req) {
return null;
}


The implementation in AbstractEditHelper is responsible for calling
getDestroyDependentsCommand().


vlad
Re: Cannot find some specific classes (problems removing components) [message #85586 is a reply to message #85266] Thu, 14 December 2006 12:59 Go to previous message
Eclipse UserFriend
Originally posted by: julias.frb.br

Thank you Vlad!! it worked =)

but it seems that this method overrides a method on the superclass.
deleting it make the thing works, ok, but what should i return, if i
wanted to put an "generated NOT" instead of deleting it?

thanks again!!

Vlad Ciubotariu wrote:
> I remember having the same problem with the generated code.
>
> In the generated XXXBaseEditHelper remove this code:
>
> /**
> * @generated
> */
> protected ICommand getDestroyElementCommand(DestroyElementRequest req) {
> return null;
> }
>
>
> The implementation in AbstractEditHelper is responsible for calling
> getDestroyDependentsCommand().
>
>
> vlad
>
>
Previous Topic:arrangeAll by code
Next Topic:Canvas Link Mapping from Node
Goto Forum:
  


Current Time: Mon Jun 09 15:22:08 EDT 2025

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

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

Back to the top