eclipse-modisco / org.eclipse.modisco

Eclipse Public License 2.0
0 stars 0 forks source link

A query having EObject as scope should be applicable to any model element #241

Closed eclipse-modisco-bot closed 2 hours ago

eclipse-modisco-bot commented 2 hours ago

| --- | --- | | Bugzilla Link | 309436 | | Status | CLOSED FIXED | | Importance | P2 normal | | Reported | Apr 16, 2010 04:16 EDT | | Modified | May 23, 2011 09:17 EDT | | Version | 0.8.0 | | Reporter | Gregoire Dupe |

Description

Created attachment 165065\ test project

Hi,

The attached MoDisco project contains a query set defining a query which has EObject as scope. This query is not executable on an EClass using the "Execution Query" view. The attached screenshot presents the problem.

Regards,\ Grégoire

:compression: test.zip

eclipse-modisco-bot commented 2 hours ago

By Gregoire Dupe on Apr 16, 2010 04:16

Created attachment 165066 Screenshot

SS-2010-04-16_10.13.24.png

SS-2010-04-16_10.13.24.png

eclipse-modisco-bot commented 2 hours ago

By Gregoire Dupe on Apr 16, 2010 04:19

Version: 0.8.0.v201004151239

eclipse-modisco-bot commented 2 hours ago

By Nicolas Bros on Apr 16, 2010 04:33

That's because an EClass is not considered by Ecore to be an instance of an EObject.\ Try this:\ eObject.eClass().eClass().getEAllSuperTypes();\ It returns EModelElement, ENamedElement and EClassifier. But not EClass!

Even though the Java class EClass extends EObject, the model element EClass doesn't extend the model element EObject in the Ecore metamodel.

eclipse-modisco-bot commented 2 hours ago

By Gregoire Dupe on Apr 16, 2010 05:35

Ok, thanks for the explanation.

I may not have been enough clear in my problem description. The problem is that if a user wants to create a query which would be applicable on any model elements, he won’t be able to do it.

For example, we can imagine to write a query to measure the memory size of a model element.

I think this bug should be renamed "A query having EObject as scope is not applicable on any model element." and not marked as fixed.

Regards,\ Grégoire

eclipse-modisco-bot commented 2 hours ago

By Nicolas Bros on Apr 16, 2010 07:36

We could add a special case so that if the scope is EObject, then it is applicable to all model elements, even though this doesn't reflect the metamodel's reality.

This would be useful for users who want a query to be applicable to model elements of any type, since there doesn't seem to be any other way to accomplish this.

eclipse-modisco-bot commented 2 hours ago

By Nicolas Bros on Apr 19, 2010 05:07

fixed in revision 2044.

eclipse-modisco-bot commented 2 hours ago

By Hugo Bruneliere on Oct 01, 2010 12:57

Bug fixed.