Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311049

Summary: The action "Create Java Query Implementation Class" is missing
Product: [Modeling] MoDisco Reporter: Gregoire Dupe <gdupe>
Component: InfrastructureAssignee: Nicolas Bros <nicolas.bros>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: hugo.bruneliere, modisco.web-inbox, nicolas.bros
Version: 0.8.0   
Target Milestone: 0.8.0 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Gregoire Dupe CLA 2010-04-29 11:46:58 EDT
Hi,

Here is a scenario to reproduce a UI problem.

In a new workspace: 
 - Create a MoDisco project
 - Create a QuerySet file
 - Add a Java query (New child > Java Model Query)
 - Right click on the Java query -> you don’t get the action "Create Java Query Implementation Class"
 - Right click on the Java query and select "Execute query"
 - Right click on the Java query -> you get the action "Create Java Query Implementation Class"

Regards,
Grégoire
Comment 1 Nicolas Bros CLA 2010-04-29 13:44:28 EDT
This is a sneaky bug: CreateJavaQueryImplClassAction is filtered by a filter named "isWorkspaceQuery", implemented by WorkspaceQueryFilter, which is created through WorkspaceQueryFilterFactory, which is an adaptable for a JavaModelQuery defined in the plugin.xml of infra.query.ui.

Problem is, WorkspaceQueryFilter is not always loaded because infra.query.ui, as any Eclipse plug-in, is lazy-loaded, and adapters don't trigger bundle loading.
Comment 2 Nicolas Bros CLA 2010-04-29 14:28:21 EDT
Fixed in revision 2177, by referencing WorkspaceQueryFilter explicitely in QueryEditor (to force it to be loaded), and moving WorkspaceQueryFilter and WorkspaceQueryFilterFactory to query.core, because query.editor cannot have a dependency on query.ui, since the opposite dependency already exists.
Comment 3 Hugo Bruneliere CLA 2010-10-01 13:32:45 EDT
Bug fixed.