Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » EMF customizing element delete command
EMF customizing element delete command [message #1074268] Fri, 26 July 2013 07:56 Go to next message
Eclipse UserFriend
Hi all,

I want to customize delete action of my model. But dont know how can i do this.

For example i have;

abstract class ContentUnit {
  attr String name;
}

class ContentModel extends ContentUnit {
  attr String webApplicataionName;
  attr String siteCollectionName;
  val Web ownedWeb;
}

class Web extends ContentUnit {
  val CustomList[*] ownedList;
  val Web[*] ownedWeb;
}

class CustomList extends ContentUnit {
}




this metamodel of my dsl.

and on diagram when a web deleted i want to delete a element releated to another resource(emf resource) on file system.

but i dont know how can i done this.

so anyone can help me ?

Regards
Re: EMF customizing element delete command [message #1074282 is a reply to message #1074268] Fri, 26 July 2013 08:16 Go to previous messageGo to next message
Eclipse UserFriend
Serhat,

Comments below.

On 26/07/2013 1:56 PM, serhat gezgin wrote:
> Hi all,
>
> I want to customize delete action of my model. But dont know how can i
> do this.
>
> For example i have;
>
>
> abstract class ContentUnit {
> attr String name;
> }
>
> class ContentModel extends ContentUnit {
> attr String webApplicataionName;
> attr String siteCollectionName;
> val Web ownedWeb;
> }
>
> class Web extends ContentUnit {
> val CustomList[*] ownedList;
> val Web[*] ownedWeb;
> }
>
> class CustomList extends ContentUnit {
> }
>
>
>
>
> this metamodel of my dsl.
>
> and on diagram when a web deleted i want to delete a element releated
> to another resource(emf resource) on file system.
How is that other element related? How will you locate that other
resource? Do you plan to load that resource into your editor's resource
set and save it and with the other resources in the editor's resource
set when the editor saves?
>
> but i dont know how can i done this.
>
> so anyone can help me ?
>
> Regards
Re: EMF customizing element delete command [message #1074446 is a reply to message #1074282] Fri, 26 July 2013 16:16 Go to previous message
Eclipse UserFriend
Hi Ed,

i have 2 diagram. On first diagram when i create web element i must create SitePermission element on another diagram and then on web element i must set releation to SitePermission element. I done this with your help (http://www.eclipse.org/forums/index.php/m/1073620/#msg_1073620).
(I load second resource to first resource resourceset and when i hit save from diagram all resources being saved)
There is no problem

Now i need when i delete web element from first diagram i must delete referanced SitePermission element from second diagram.

But i dont know where is the delete action of elements or commands.
So i want to ask u how can i add this behavior to my first diagram?

Regards.

Previous Topic:EMF resource has been changed Error
Next Topic:[Texo] NullPointer while generating ORM Annotated Model
Goto Forum:
  


Current Time: Wed Jul 30 17:21:49 EDT 2025

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

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

Back to the top