adding markers to eugenia based editor after applying evl constraints to emfdiff model [message #527798] |
Fri, 16 April 2010 10:24  |
Eclipse User |
|
|
|
Hello Community,
I am currently working with consistency checking. I am comparing two model of same meta model and getting errors markers in the validation view of the EVL after applying the EVL constraints on the emfdiff model generated after model comparison. I want to attach the evl constraints which i am applying to emf diffmodel with eugenia based editor.
I have the following questions
which exentions should be used to attach the evl constraints for emfdiff model so that i get the errors in the errors view ?
and how can i see the error markers in the eugenia based editor?
is there any other efficient way of solving the above mentioned challenge?
best regards
saad
|
|
|
|
|
|
|
Re: adding markers to eugenia based editor after applying evl constraints to emfdiff model [message #528123 is a reply to message #527995] |
Mon, 19 April 2010 08:29   |
Eclipse User |
|
|
|
Hi Saad,
The namespace uri of *.emfdiff models is
http://www.eclipse.org/emf/compare/diff/1.1 As you're running this
through a standalone Java application, please make sure that the EMF
diff EPackage is actually in the EPackage registry before trying to load
the model.
Cheers,
Dimitris
saad bin abid wrote:
> Hello Dimitrios,
> thanks again for the reply. yes i changed the Jre version and it started
> working now. I have one more question regarding
>
> models.add(createEmfModel("Model", "models/result.emfdiff", "x", true,
> true));
>
> when i am trying to load the models both the instance and the meta
> model, I want to know what should i put in "x", which has to be the meta
> model for the emfdiff model? any ideas how can i actually load the
> models before i apply the constraints on results.emfdiff?
>
> best regards
> saad
--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
|
|
|
|
Re: adding markers to eugenia based editor after applying evl constraints to emfdiff model [message #528679 is a reply to message #528673] |
Wed, 21 April 2010 09:06   |
Eclipse User |
|
|
|
Hi Saad,
You'll need to add the org.eclipse.emf.compare.diff and
org.eclipse.emf.compare.match plugins to the dependencies of your
project and add these two lines at the beginning of your getModels() method:
EPackage.Registry.INSTANCE.put(DiffPackage.eNS_URI,
DiffPackage.eINSTANCE);
EPackage.Registry.INSTANCE.put(MatchPackage.eNS_URI,
MatchPackage.eINSTANCE);
Cheers,
Dimitris
saad bin abid wrote:
> Hello Dimitrios,
>
> Thank you again. I used the following code in EvlStandaloneExample.java
> class to upload the models
>
> @Override
> public List<IModel> getModels() throws Exception {
> List<IModel> models = new ArrayList<IModel>();
>
> String file="
> C:/eclipse-Galileo/eclipse/Sciaml-Test/ie.lero.helloworld.de
> mo.compare/diffmodel/result.emfdiff ";
> models.add(createEmfModelByURI("Model", file,
> "http://www.eclipse.org/emf/compare/diff/1.1", true, true));
> return models;
> }
>
> @Override
> public String getSource() throws Exception {
> return "
> C:/eclipse-Galileo/eclipse/Sciaml-Test/ie.lero.helloworld.de
> mo.compare/diffmodel.evl ";
> }
>
>
> where "result.emfdiff" and "diffmodel.evl" are in runtime enviornment.
> When i run the code using incremental plug-in i get the following error
>
>
> java.lang.NullPointerException
> at org.eclipse.epsilon.examples.standalone.EpsilonStandaloneExa
> mple.getFile(EpsilonStandaloneExample.java:98)
> at org.eclipse.epsilon.examples.standalone.EpsilonStandaloneExa
> mple.execute(EpsilonStandaloneExample.java:45)
> at ie.lero.scicalc.emfdiffmarkers.builder.SampleBuilder.checkXM
> L(SampleBuilder.java:113)
> at ie.lero.scicalc.emfdiffmarkers.builder.SampleBuilder$SampleR
> esourceVisitor.visit(SampleBuilder.java:62)
> at org.eclipse.core.internal.resources.Resource$2.visit(Resourc
> e.java:108)
> at org.eclipse.core.internal.resources.Resource$1.visitElement(
> Resource.java:60)
> at org.eclipse.core.internal.watson.ElementTreeIterator.doItera
> tion(ElementTreeIterator.java:82)
> at org.eclipse.core.internal.watson.ElementTreeIterator.doItera
> tion(ElementTreeIterator.java:86)
> at org.eclipse.core.internal.watson.ElementTreeIterator.iterate
> (ElementTreeIterator.java:127)
> at org.eclipse.core.internal.resources.Resource.accept(Resource
> .java:70)
> at org.eclipse.core.internal.resources.Resource.accept(Resource
> .java:106)
> at org.eclipse.core.internal.resources.Resource.accept(Resource
> .java:90)
> at ie.lero.scicalc.emfdiffmarkers.builder.SampleBuilder.fullBui
> ld(SampleBuilder.java:124)
> at ie.lero.scicalc.emfdiffmarkers.builder.SampleBuilder.build(S
> ampleBuilder.java:93)
> at org.eclipse.core.internal.events.BuildManager$2.run(BuildMan
> ager.java:627)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(Bui
> ldManager.java:170)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(Bui
> ldManager.java:201)
> at org.eclipse.core.internal.events.BuildManager$1.run(BuildMan
> ager.java:253)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(Bui
> ldManager.java:256)
> at org.eclipse.core.internal.events.BuildManager.basicBuildLoop
> (BuildManager.java:309)
> at org.eclipse.core.internal.events.BuildManager.build(BuildMan
> ager.java:341)
> at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBu
> ildJob.java:140)
> at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJ
> ob.java:238)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>
> it is not getting the files to load. could you please help me with this?
>
> best regards
> saad
--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
|
|
|
|
|
|
|
Re: adding markers to eugenia based editor after applying evl constraints to emfdiff model [message #588377 is a reply to message #588370] |
Mon, 19 April 2010 08:29   |
Eclipse User |
|
|
|
Hi Saad,
The namespace uri of *.emfdiff models is
http://www.eclipse.org/emf/compare/diff/1.1 As you're running this
through a standalone Java application, please make sure that the EMF
diff EPackage is actually in the EPackage registry before trying to load
the model.
Cheers,
Dimitris
saad bin abid wrote:
> Hello Dimitrios,
> thanks again for the reply. yes i changed the Jre version and it started
> working now. I have one more question regarding
>
> models.add(createEmfModel("Model", "models/result.emfdiff", "x", true,
> true));
>
> when i am trying to load the models both the instance and the meta
> model, I want to know what should i put in "x", which has to be the meta
> model for the emfdiff model? any ideas how can i actually load the
> models before i apply the constraints on results.emfdiff?
>
> best regards
> saad
--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
|
|
|
|
Re: adding markers to eugenia based editor after applying evl constraints to emfdiff model [message #588509 is a reply to message #588493] |
Wed, 21 April 2010 09:06   |
Eclipse User |
|
|
|
Hi Saad,
You'll need to add the org.eclipse.emf.compare.diff and
org.eclipse.emf.compare.match plugins to the dependencies of your
project and add these two lines at the beginning of your getModels() method:
EPackage.Registry.INSTANCE.put(DiffPackage.eNS_URI,
DiffPackage.eINSTANCE);
EPackage.Registry.INSTANCE.put(MatchPackage.eNS_URI,
MatchPackage.eINSTANCE);
Cheers,
Dimitris
saad bin abid wrote:
> Hello Dimitrios,
>
> Thank you again. I used the following code in EvlStandaloneExample.java
> class to upload the models
>
> @Override
> public List<IModel> getModels() throws Exception {
> List<IModel> models = new ArrayList<IModel>();
>
> String file="
> C:/eclipse-Galileo/eclipse/Sciaml-Test/ie.lero.helloworld.de
> mo.compare/diffmodel/result.emfdiff ";
> models.add(createEmfModelByURI("Model", file,
> "http://www.eclipse.org/emf/compare/diff/1.1", true, true));
> return models;
> }
>
> @Override
> public String getSource() throws Exception {
> return "
> C:/eclipse-Galileo/eclipse/Sciaml-Test/ie.lero.helloworld.de
> mo.compare/diffmodel.evl ";
> }
>
>
> where "result.emfdiff" and "diffmodel.evl" are in runtime enviornment.
> When i run the code using incremental plug-in i get the following error
>
>
> java.lang.NullPointerException
> at org.eclipse.epsilon.examples.standalone.EpsilonStandaloneExa
> mple.getFile(EpsilonStandaloneExample.java:98)
> at org.eclipse.epsilon.examples.standalone.EpsilonStandaloneExa
> mple.execute(EpsilonStandaloneExample.java:45)
> at ie.lero.scicalc.emfdiffmarkers.builder.SampleBuilder.checkXM
> L(SampleBuilder.java:113)
> at ie.lero.scicalc.emfdiffmarkers.builder.SampleBuilder$SampleR
> esourceVisitor.visit(SampleBuilder.java:62)
> at org.eclipse.core.internal.resources.Resource$2.visit(Resourc
> e.java:108)
> at org.eclipse.core.internal.resources.Resource$1.visitElement(
> Resource.java:60)
> at org.eclipse.core.internal.watson.ElementTreeIterator.doItera
> tion(ElementTreeIterator.java:82)
> at org.eclipse.core.internal.watson.ElementTreeIterator.doItera
> tion(ElementTreeIterator.java:86)
> at org.eclipse.core.internal.watson.ElementTreeIterator.iterate
> (ElementTreeIterator.java:127)
> at org.eclipse.core.internal.resources.Resource.accept(Resource
> .java:70)
> at org.eclipse.core.internal.resources.Resource.accept(Resource
> .java:106)
> at org.eclipse.core.internal.resources.Resource.accept(Resource
> .java:90)
> at ie.lero.scicalc.emfdiffmarkers.builder.SampleBuilder.fullBui
> ld(SampleBuilder.java:124)
> at ie.lero.scicalc.emfdiffmarkers.builder.SampleBuilder.build(S
> ampleBuilder.java:93)
> at org.eclipse.core.internal.events.BuildManager$2.run(BuildMan
> ager.java:627)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(Bui
> ldManager.java:170)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(Bui
> ldManager.java:201)
> at org.eclipse.core.internal.events.BuildManager$1.run(BuildMan
> ager.java:253)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(Bui
> ldManager.java:256)
> at org.eclipse.core.internal.events.BuildManager.basicBuildLoop
> (BuildManager.java:309)
> at org.eclipse.core.internal.events.BuildManager.build(BuildMan
> ager.java:341)
> at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBu
> ildJob.java:140)
> at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJ
> ob.java:238)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>
> it is not getting the files to load. could you please help me with this?
>
> best regards
> saad
--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
|
|
|
Re: adding markers to eugenia based editor after applying evl constraints to emfdiff model [message #588537 is a reply to message #528679] |
Wed, 21 April 2010 13:05  |
Eclipse User |
|
|
|
Hello Dimitrios,
Thanks again for the quick reply. I followed the instructions you mentioned earlier. unfortunately its still not loading the models and i am getting the following errors
Exception in thread "main" java.lang.NullPointerException
at org.eclipse.epsilon.emc.emf.EmfModelResourceFactory.createRe source(EmfModelResourceFactory.java:47)
at org.eclipse.epsilon.emc.emf.EmfModelResourceSet.createResour ce(EmfModelResourceSet.java:23)
at org.eclipse.epsilon.emc.emf.EmfModel.loadModel(EmfModel.java :181)
at org.eclipse.epsilon.emc.emf.EmfModel.load(EmfModel.java:96)
at org.eclipse.epsilon.emc.emf.EmfModel.load(EmfModel.java:90)
at org.eclipse.epsilon.examples.standalone.EpsilonStandaloneExa mple.createEmfModelByURI(EpsilonStandaloneExample.java:95)
at org.eclipse.epsilon.examples.standalone.evl.EvlStandaloneExa mple.getModels(EvlStandaloneExample.java:67)
at org.eclipse.epsilon.examples.standalone.EpsilonStandaloneExa mple.execute(EpsilonStandaloneExample.java:58)
at org.eclipse.epsilon.examples.standalone.evl.EvlStandaloneExa mple.main(EvlStandaloneExample.java:49)
I don't know how to proceed from here. I am sending you the project i am working with on your official e mail address. If you get some time please have a look.
Thank you very much.
best regards
saad
|
|
|
Powered by
FUDForum. Page generated in 0.05716 seconds