Skip to main content



      Home
Home » Archived » Visual Editor (VE) » What is InverseMaintenaceAdapter for?
What is InverseMaintenaceAdapter for? [message #108638] Mon, 03 October 2005 04:47 Go to next message
Eclipse UserFriend
Hi all,

can somebody explain me what is InverseMaintenaceAdapter for?

Thanks,

John Cage
Re: What is InverseMaintenaceAdapter for? [message #108690 is a reply to message #108638] Mon, 03 October 2005 10:45 Go to previous messageGo to next message
Eclipse UserFriend
Hi John,

> can somebody explain me what is InverseMaintenaceAdapter for?

EMf provides an XMI based object model that the VE uses to store a model
of the Java GUI, its beans and their properties and relationships. In
EMF you can walk from an object across a feature using code like

EStructuralFeature sourceFeature = source.eClass().eGetFeature(featureName);
source.eGet(sourceFeature);

For example, if you want to go from an IJavaInstance has has a "control"
feature you do

EStructuralFeature sf = javaInstance.eClass().eGetFeature("control");
IJavaInstance controlInstance = javaInstance.eGet(sf);

Now if you have the control and want to see who references it through
control feature you are walking backwards. The first thing to do is get
the structural feature that you think points to you doing something like

EStructuralFeature sf =
Utilities.getJavaClass("com.package.ClassThatPointsToMe",resourceSet).eGet( "control");
InverseMaintenceAdapter.getfirstReferencedBy(controlInstance ,sf);

Each time an EMF object points to another a back pointer is added
automatically by the VE that can be found using
InverseMaintenacenAdapter, which is very useful for doing things like
cascading delete or just working out how an object is used.

Best regards,

Joe Winchester
Re: What is InverseMaintenaceAdapter for? [message #108741 is a reply to message #108690] Tue, 04 October 2005 03:08 Go to previous message
Eclipse UserFriend
Thanks Joe,
for clear explanation.

Best Regards,
John Cage
Re: What is InverseMaintenaceAdapter for? [message #610909 is a reply to message #108638] Mon, 03 October 2005 10:45 Go to previous message
Eclipse UserFriend
Hi John,

> can somebody explain me what is InverseMaintenaceAdapter for?

EMf provides an XMI based object model that the VE uses to store a model
of the Java GUI, its beans and their properties and relationships. In
EMF you can walk from an object across a feature using code like

EStructuralFeature sourceFeature = source.eClass().eGetFeature(featureName);
source.eGet(sourceFeature);

For example, if you want to go from an IJavaInstance has has a "control"
feature you do

EStructuralFeature sf = javaInstance.eClass().eGetFeature("control");
IJavaInstance controlInstance = javaInstance.eGet(sf);

Now if you have the control and want to see who references it through
control feature you are walking backwards. The first thing to do is get
the structural feature that you think points to you doing something like

EStructuralFeature sf =
Utilities.getJavaClass("com.package.ClassThatPointsToMe",resourceSet).eGet( "control");
InverseMaintenceAdapter.getfirstReferencedBy(controlInstance ,sf);

Each time an EMF object points to another a back pointer is added
automatically by the VE that can be found using
InverseMaintenacenAdapter, which is very useful for doing things like
cascading delete or just working out how an object is used.

Best regards,

Joe Winchester
Re: What is InverseMaintenaceAdapter for? [message #610913 is a reply to message #108690] Tue, 04 October 2005 03:08 Go to previous message
Eclipse UserFriend
Thanks Joe,
for clear explanation.

Best Regards,
John Cage
Previous Topic:How to change the colors of the Text along with different inputs?
Next Topic:Feedback/Ideas
Goto Forum:
  


Current Time: Sat May 10 21:20:09 EDT 2025

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

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

Back to the top