Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Extending the Deletion of an Element
Extending the Deletion of an Element [message #104693] Fri, 16 February 2007 16:07 Go to next message
Eclipse UserFriend
I want to add some behavior to the deletion of some of my model elements.
Do you have any suggestions on how to do this?
Re: Extending the Deletion of an Element [message #104714 is a reply to message #104693] Fri, 16 February 2007 16:08 Go to previous messageGo to next message
Eclipse UserFriend
take a look at NotationViewDependentsAdvice

John Gilbert wrote:
> I want to add some behavior to the deletion of some of my model
> elements. Do you have any suggestions on how to do this?
>
Re: Extending the Deletion of an Element [message #104726 is a reply to message #104714] Fri, 16 February 2007 17:06 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the response! That confirms that I am headed down the right
path. However, I can't get the EditHelpAdvise class to execute. Here is my
extension xml. Am I missing something?


<metamodelType
id="net.taylor.uml2.classdiagram.Package_79"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
eclass="Package"
edithelper="net.taylor.uml2.classdiagram.edit.helpers.PackageEditHelper ">
<param name="semanticHint" value="79"/>
</metamodelType>
<specializationType
id="net.taylor.uml2.classdiagram.Package_79a"
name="Package"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
edithelperadvice=" net.taylor.uml2.classdiagram.edit.helpers.PackageEditHelperA dvice ">
<specializes id="net.taylor.uml2.classdiagram.Package_79"/>
<param name="semanticHint" value="79"/>
</specializationType>
Re: Extending the Deletion of an Element [message #104966 is a reply to message #104726] Mon, 19 February 2007 10:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vcciubot.uwaterloo.ca

Are you customizing the deletion of a specialization type or a metamodel
type? You have to put your advice binding inside the metamodel
declaration. If you're using a specialization type, are you passing it to
the creation tool accordingly?

On Fri, 16 Feb 2007 22:06:56 +0000, John Gilbert wrote:

> Thanks for the response! That confirms that I am headed down the right
> path. However, I can't get the EditHelpAdvise class to execute. Here is my
> extension xml. Am I missing something?
>
>
> <metamodelType
> id="net.taylor.uml2.classdiagram.Package_79"
> kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
> eclass="Package"
> edithelper="net.taylor.uml2.classdiagram.edit.helpers.PackageEditHelper ">
> <param name="semanticHint" value="79"/>
> </metamodelType>
> <specializationType
> id="net.taylor.uml2.classdiagram.Package_79a"
> name="Package"
> kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
> edithelperadvice=" net.taylor.uml2.classdiagram.edit.helpers.PackageEditHelperA dvice ">
> <specializes id="net.taylor.uml2.classdiagram.Package_79"/>
> <param name="semanticHint" value="79"/>
> </specializationType>
Re: Extending the Deletion of an Element [message #105589 is a reply to message #104966] Tue, 20 February 2007 13:13 Go to previous messageGo to next message
Eclipse UserFriend
Ok. That makes sense. I tried this but it doesn't seem to work.

<metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML">
<metamodelType
id="net.taylor.uml2.classdiagram.Package_79"
kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
eclass="Package"
edithelper="net.taylor.uml2.classdiagram.edit.helpers.PackageEditHelper ">
<param name="semanticHint" value="79"/>
</metamodelType>
<adviceBinding
id=" net.taylor.uml2.classdiagram.edit.helpers.PackageEditHelperA dvice "
typeId="net.taylor.uml2.classdiagram.Package_79"
class=" net.taylor.uml2.classdiagram.edit.helpers.PackageEditHelperA dvice "
inheritance="all">
</adviceBinding>
</metamodel>
Re: Extending the Deletion of an Element [message #105603 is a reply to message #105589] Tue, 20 February 2007 13:56 Go to previous messageGo to next message
Eclipse UserFriend
by adding this :

<advice
ref="org.eclipse.gmf.examples.library.diagram.adviceBinding2 "></advice>

to the <binding context="Library07ClientContext">

the adding this extension

<metamodel
nsURI="http:///org/eclipse/gmf/examples/library.ecore">
<adviceBinding
class=" org.eclipse.gmf.examples.library.diagram.edit.helpers.MyAdvi ce "
id="org.eclipse.gmf.examples.library.diagram.adviceBinding2 "
inheritance="none"
typeId="*">
</adviceBinding>
</metamodel>

i find that MyAdvice get called



John Gilbert wrote:
> Ok. That makes sense. I tried this but it doesn't seem to work.
>
> <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML">
> <metamodelType
> id="net.taylor.uml2.classdiagram.Package_79"
> kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
> eclass="Package"
>
> edithelper="net.taylor.uml2.classdiagram.edit.helpers.PackageEditHelper ">
> <param name="semanticHint" value="79"/>
> </metamodelType>
> <adviceBinding
>
> id=" net.taylor.uml2.classdiagram.edit.helpers.PackageEditHelperA dvice "
> typeId="net.taylor.uml2.classdiagram.Package_79"
>
> class=" net.taylor.uml2.classdiagram.edit.helpers.PackageEditHelperA dvice "
> inheritance="all">
> </adviceBinding>
> </metamodel>
>
>
Re: Extending the Deletion of an Element [message #105627 is a reply to message #105603] Tue, 20 February 2007 15:49 Go to previous message
Eclipse UserFriend
Thanks! I've got it working now.
Previous Topic:Deadlock in WorkspaceSynchronizer
Next Topic:RowLayout
Goto Forum:
  


Current Time: Thu Jul 17 20:56:10 EDT 2025

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

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

Back to the top