Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 11:56 Go to next message
serhat gezgin is currently offline serhat gezginFriend
Messages: 243
Registered: January 2013
Location: Izmir
Senior Member
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 12:16 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
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


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF customizing element delete command [message #1074446 is a reply to message #1074282] Fri, 26 July 2013 20:16 Go to previous message
serhat gezgin is currently offline serhat gezginFriend
Messages: 243
Registered: January 2013
Location: Izmir
Senior Member
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: Fri Apr 19 05:04:27 GMT 2024

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

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

Back to the top