Community
Participate
Working Groups
Created attachment 172419 [details] the invalid model ... Hello, When navigating a model that references non Emf objects (standard java objects), the following error occurs: java.lang.Class cannot be cast to org.eclipse.emf.EObject To reproduce the bug, use the provided model (be careful to open these model, you will have to install the b3 project from this repository = http://dev.eclipse.org/svnroot/modeling/org.eclipse.emft.b3). Regards, Gabriel
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.