Bug 345370 - [Query] Editor : bug when the class implementing the query doesn't implements DIRECTLY with IJavaModelQuery
Summary: [Query] Editor : bug when the class implementing the query doesn't implements...
Status: ASSIGNED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EMF-Facet (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: Gregoire Dupe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-11 03:51 EDT by Vincent Lorenzo CLA
Modified: 2020-05-01 11:26 EDT (History)
2 users (show)

See Also:
gdupe: indigo+
gdupe: kepler+


Attachments
Patch for Bug 345370 (8.16 KB, patch)
2011-05-18 08:05 EDT, Nicolas Guyomar CLA
gdupe: iplog-
Details | Diff
Patch for Bug 345370 non regression test (6.83 KB, patch)
2011-05-25 09:19 EDT, Nicolas Guyomar CLA
gdupe: iplog-
Details | Diff
Patch for Bug 345370 non regression test (7.54 KB, patch)
2011-06-14 11:42 EDT, Nicolas Guyomar CLA
gdupe: iplog-
Details | Diff
Patch for Bug 345370 (7.83 KB, patch)
2011-06-16 11:38 EDT, Nicolas Guyomar CLA
gdupe: review-
Details | Diff
Patch for Bug 345370 non regression test (12.57 KB, patch)
2011-06-16 11:39 EDT, Nicolas Guyomar CLA
gdupe: review+
Details | Diff
Unit test to check thath the qualified name is used in the validation (6.56 KB, patch)
2011-06-27 08:23 EDT, Gregoire Dupe CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Lorenzo CLA 2011-05-11 03:51:20 EDT
1/ Create a QuerySet owning a query
	2/ Create the java class for this query and declare it in the QuerySet file
		-> that works fine
	3/ Create a super-class for your Java Query. This super-class should implement IJavaModelQuery
	4/ Delete "implements IJavaModelQuery" in your class implementing the Query
		-> the Query Editor indicates that you have an error : "yourQuery.java doesn't implements IJavaModelQuery". This error is wrong, because this interface is now implemented in your super-class.
Comment 1 Nicolas Guyomar CLA 2011-05-18 08:05:26 EDT
Created attachment 195955 [details]
Patch for Bug 345370

Hi Vincent,

I've added the verification of the superClasses hierarchy in our querySet validation process.

Please note that if the superClass is not contained by an installed plugin, it will not be hot loaded and you will not be able to execute your query.

(a) I, Nicolas Guyomar, wrote 100% of the code I've provided.
(b) I have the right to contribute the code to Eclipse.
(c) I contribute the content under the EPL.
(d) This contribution contains no Cryptography features.

Regards,
Nicolas Guyomar
Comment 2 Gregoire Dupe CLA 2011-05-20 08:33:41 EDT
Hello,

This bug is not blocking or critical. In conformance with the ramp down policy [1], the commit of its fixing will then be delayed to version 0.1.1 (Indigo SR1).

[1] http://wiki.eclipse.org/Modeling_Project_Ramp_Down_Policy

Regards,
Gregoire Dupe
Comment 3 Nicolas Guyomar CLA 2011-05-25 09:19:18 EDT
Created attachment 196548 [details]
Patch for Bug 345370 non regression test

Hi,

Please find attache a non regression test for this kind of query.

(a) I, Nicolas Guyomar, wrote 100% of the code I've provided.
(b) I have the right to contribute the code to Eclipse.
(c) I contribute the content under the EPL.
(d) This contribution contains no Cryptography features.

Regards,
Nicolas Guyomar
Comment 4 Nicolas Guyomar CLA 2011-06-14 11:42:35 EDT
Created attachment 197961 [details]
Patch for Bug 345370 non regression test

Hi,

Please find attached an updated version of the non regression test.
Test resources were not contained in the correct folder.

(a) I, Nicolas Guyomar, wrote 100% of the code I've provided.
(b) I have the right to contribute the code to Eclipse.
(c) I contribute the content under the EPL.
(d) This contribution contains no Cryptography features.

Regards,
Nicolas Guyomar
Comment 5 Nicolas Guyomar CLA 2011-06-16 11:38:18 EDT
Created attachment 198122 [details]
Patch for Bug 345370

Hi,

I was able to reduce my previous correction using IType.newSupertypeHierarchy().getAllTypes() method.

This does not changes behavior, and every unit test succeeded on my computer

(a) I, Nicolas Guyomar, wrote 100% of the code I've provided.
(b) I have the right to contribute the code to Eclipse.
(c) I contribute the content under the EPL.
(d) This contribution contains no Cryptography features.

Regards,
Nicolas Guyomar
Comment 6 Nicolas Guyomar CLA 2011-06-16 11:39:38 EDT
Created attachment 198123 [details]
Patch for Bug 345370 non regression test

Hi,

I forgot to cover one use case in my previous non regression test:
"The query can implements an interface which itself extends IJavaModelQuery"

This new version covers this use case

(a) I, Nicolas Guyomar, wrote 100% of the code I've provided.
(b) I have the right to contribute the code to Eclipse.
(c) I contribute the content under the EPL.
(d) This contribution contains no Cryptography features.

Regards,
Nicolas Guyomar
Comment 7 Gregoire Dupe CLA 2011-06-27 08:23:53 EDT
Created attachment 198640 [details]
Unit test to check thath the qualified name is used in the validation

The patch in the attachment 198123 [details] dose not totally solves the problem. The test is done on a class name rather than on the class qualified name.

Here is a unit test to reproduce the problem.

(a) I, Gregoire Dupe, wrote 100% of the code I've provided.
(b) I have the right to contribute the code to Eclipse.
(c) I contribute the content under the EPL.
(d) This contribution contains no Cryptography features.
Comment 8 Gregoire Dupe CLA 2011-06-27 08:24:55 EDT
Comment on attachment 198122 [details]
Patch for Bug 345370

review-, cf. attachment 198640 [details]