Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342548 - [Java Discovery] Illegal parameter initializer for ELEMENTS_TO_ANALYZE
Summary: [Java Discovery] Illegal parameter initializer for ELEMENTS_TO_ANALYZE
Status: CLOSED FIXED
Alias: None
Product: MoDisco
Classification: Modeling
Component: Technologies (show other bugs)
Version: 0.9.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 0.9.0 M7   Edit
Assignee: Nicolas Bros CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-12 07:33 EDT by Fabien Giquel CLA
Modified: 2011-08-18 08:06 EDT (History)
3 users (show)

See Also:
nicolas.bros: indigo+


Attachments
stack trace (13.53 KB, text/plain)
2011-04-12 07:33 EDT, Fabien Giquel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabien Giquel CLA 2011-04-12 07:33:09 EDT
When creating some Discovery Launch Config, and selecting oem.java.discover.fromProject, and opening ELEMENTS_TO_SERIALIZE widget without providing an input project, there are two thrown exceptions :

- Illegal parameter initializer for ELEMENTS_TO_ANALYZE
- IllegalArgumentException: Path for project must have only one segment

See stackTrace for details.
Comment 1 Fabien Giquel CLA 2011-04-12 07:33:54 EDT
Created attachment 193034 [details]
stack trace
Comment 2 Nicolas Bros CLA 2011-04-14 04:41:36 EDT
Fixed in revision 4297.
Comment 3 Fabien Giquel CLA 2011-04-14 06:00:58 EDT
I have updated the modifications but still have the exceptions.

More precisions about use case :
1 - going "Run Configurations..."
2 - creating conf Discoverer
3 - choosing in combo the discoverer "oem.java.discover.project"
--> immediatly two new entries in log error
--> if open widget "Elemnts_to_analyse", another exceptions in log error
Comment 4 Nicolas Bros CLA 2011-04-14 09:29:54 EDT
I committed a new fix in revision 4301.

There was a problem when the source field was empty : it resulted in the workspace root to be returned, which doesn't have the expected type.
So, I added a cell editor and dialog that deal specifically with IProjects.
Comment 5 Fabien Giquel CLA 2011-04-19 09:30:36 EDT
Hi Nicolas,

i tested the fix. It works for "oem.java.discover.project" but i still have the exception for "oem.java.discover.javaProject".

I had a look at the fix in "JavaElementsToAnalyzeComposite" and understood that the problem should be that a change source event has been sent when choosing "oem.java.discover.javaProject", and so one ElementsToAnalyze instance has been created.

Moreover I think that "JavaElementsToAnalyzeComposite" class should not deduce, from one "ElementsToAnalyze" null value, that the discovery source is still null. So "You must first select a Java project as source." message should be replaced with some neutral "No Java elements to analyze" message.
Comment 6 Nicolas Bros CLA 2011-04-20 03:20:43 EDT
(In reply to comment #5)
> I still have the exception for "oem.java.discover.javaProject".
Fixed in revision 4326 by never creating an instance of ElementsToAnalyze for a null source.

I also changed the error message in the dialog box.
Comment 7 Hugo Bruneliere CLA 2011-08-18 08:06:18 EDT
Bug solved.