| Summary: | Model Browser: invalid emf model element | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] MoDisco | Reporter: | Gabriel BARBIER <barbier.gabriel> | ||||
| Component: | Infrastructure | Assignee: | Nicolas Bros <nicolas.bros> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | fabien.giquel, gdupe, hugo.bruneliere, modisco.web-inbox, nicolas.bros | ||||
| Version: | 0.9.0 | Flags: | nicolas.bros:
indigo+
|
||||
| Target Milestone: | 0.9.0 M1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Gabriel BARBIER
I forgot to add that the same model had been correctly opened in the Ecore reflexive editor. I could not find an editor that opens files with this "b3" extension. From what I see in the sources, it looks like the corresponding genmodel has to be generated, but I didn't understand how. I found how to make it work: I had to install com.google.collect 0.8.0, which is not in Orbit, contrary to the 1.0.0 version, which is incompatible. Fixed in revision 2664, by working on Objects instead of EObjects (I previously assumed EObject#eGet returned EObjects or lists of EObjects).
I noticed another problem, though: the model browser keeps refreshing itself when showing a "BuildUnit", because org.eclipse.b3.build.impl.BuildUnitImpl.getBuilders() is implemented in a way that modifies the model each time it is called. And since the model browser refreshes itself each time the model changes, it keeps refreshing (using 100% of one CPU core).
In ModelQuerySetImpl, I fixed the same problem a while ago by doing this:
public EList<ModelQuery> getQueries() {
if (queries == null) {
queries = new EObjectContainmentWithInverseEList<ModelQuery>(ModelQuery.class, this, QueryPackage.MODEL_QUERY_SET__QUERIES, QueryPackage.MODEL_QUERY__MODEL_QUERY_SET);
}
return queries;
}
Bug fixed. |