| Summary: | Dialog warning that project does not contain annotated source | ||
|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Michael Giroux <michael.giroux> |
| Component: | Tools | Assignee: | Dave Steinberg <davidms> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | ||
| Version: | 2.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Michael Giroux
I'll add this to the long list in the other bug... We have a lot more serious types of problems to report. Even errors within the annotations are currently mostly overlooked or ignored... :-( *** This bug has been marked as a duplicate of 104727 *** Reopening to mark WONTFIX. The fact that no packages are shown quite reasonably implies that no modeled elements were found in the Java source. The only other possible conclusion I could think of is that perhaps an error prevented the importer from building a model. But we'd have no way of distinguishing between those two cases at this point (either way, we'd have no model elements), so adding an error message wouldn't appear to be terribly helpful. (In reply to comment #3) > so adding an error message > wouldn't appear to be terribly helpful. I do not agree. It is not obvious to a user of EMF that an empty package selection dialog is the same as not finding any model information. The user might think that the project is structured incorrectly and that the .classpath file does not contain a classpathentry for any packages. Maybe I did not create packages. Maybe I am using the wrong type of project. Who knows. I spent about 30 minutes looking into this problem before I discovered that I did not have a @model on the interface. In fact, I *DID* have @model on several getXxx methods so the fact that the @model was missing on the interface statement escaped me for quite a while. See sample below. I thought the point of the model-from-java feature was to give a java developer who is *NOT* familiar w/ EMF a headstart. A subtle error as I have below was very difficult to discover without any form of diagnostic message. Michael Giroux package com.bull.giroux; import org.eclipse.emf.ecore.EObject; public interface Book extends EObject{ /** * @model */ public String getAuthor(); /** * @model */ public int getPages(); /** * @model */ public int getYear(); } Okay, you've convinced me. You make excellent points, and it didn't hurt that it was much easier to fix than I first thought. ;) If no model elements were produced by the importer, you'll now get an error message. Depending on whether any Java source files were encountered, it will be one of the following: No Java source was found No model elements were found in Java source: check for "@model" on interfaces and classes The fix is in CVS. Fixed in 2.2.0.I200605181255. Move to verified as per bug 206558. |