|Re: Operating/editing the results of a query [message #658252 is a reply to message #657833]
||Mon, 07 March 2011 15:01
| Fabien Giquel
Registered: July 2009
in EMF Java API, you can remove EObjects from Java models with
EcoreUtil.delete(EObject eObject, boolean recursive) service. Indicating
a recursive delete is prefered for deleting references to contained objects.
notice that the java model will be no more valid when some eobjects are
deleted. e.g. if you delete some private method, some MethodInvocation
instances pointing to it from one java statement will be invalid. It may
not be important in your use case if you do not care of Java statements
in method bodies.
Le 04/03/2011 10:01, Hallvard Trætteberg a écrit :
> I'm working on a project for creating an EMF facade to an(y) Java
> (legacy) API. The idea is to allow a developer to operate on EMF object,
> and automatically sync the corresponding Java (legacy) objects.
> To avoid hand-coding, I'm trying to use Modisco to discover various
> patterns of get/set/add/remove methods in the Java API, so I can
> generate both the EMF facade classes and the mapping strategy. Since the
> API is fairly large (in fact it's SWT) I try to "prune" the model, so
> I've created queries that retrieve the non-public methods (irrelevant
> for the facade). I get a result set, but now I want to remove those
> objects from the model. Is this possible? If not directly, what's the
> easiest way of doing this?
|Re: Operating/editing the results of a query [message #658809 is a reply to message #658618]
||Wed, 09 March 2011 21:21
| Hallvard Traetteberg
Registered: July 2009
Location: Trondheim, Norway
On 09.03.11 10.43, Fabien wrote:|
> Until now, you cannot execute such a request from the result table UI in
> one shot on all objects.
I solved it by creating a specific deletion query, corresponding to a
selection query. However, if it was possible to execute a query on all
the objects, in the table, i.e. allow multiple selection as is possible
in the main view, I could use a generic deletion query on the result of
> Notice that queries implementations may invoke themselves together, so
> that a command query may start with a call to another selection query.
Yes, that makes it possible to avoid duplicating code.
Powered by FUDForum
. Page generated in 0.02276 seconds