Hi,
I'm trying to open an OCL file beginning with ("..." is my model URI):
MainModel : http://...
context Operator
[...]
My Python script code is :
resourceSet1 = ResourceSetImpl()
uriproj=URI.createURI(URI_String)
resproj=resourceSet1.createResource(uriproj)
env=EcoreEnvironmentFactory()
myocl=OCL(env, resproj)
F1=FileInputStream(OCLFile_path)
ocl=OCLInput(F1)
oclparsed=myocl.parse(ocl)
When I execute the script including this code I get the following Error:
File "/essaiEx1Jyt/scripts/Example1.py", line 51, in main
oclparsed=myocl.parse(ocl)
at org.eclipse.ocl.util.OCLUtil.checkForErrors(OCLUtil.java:350)
at org.eclipse.ocl.OCL.parse(OCL.java:324)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
org.eclipse.ocl.SyntaxException: org.eclipse.ocl.SyntaxException: 1:1:1:11
"MainModel :" misplaced construct(s)
C:/Users/to100966/workspace/essaiEx1Jyt/scripts/Example1.py
How can I get a Misplaced construct if the MainModel line is an automatic line
putted by the New OCLFile Wizard
The information in this e-mail is confidential. The contents may not be
disclosed or used by anyone other than the addressee. Access to this e-mail by
anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and
delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of
this e-mail as it has been sent over public networks. If you have any concerns
over the content of this message or its Accuracy or Integrity, please contact
Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus
scanning software but you should take whatever measures you deem to be
appropriate to ensure that this message and any attachments are virus free.
_______________________________________________
Topcased-users mailing list
[email protected]
http://lists.gforge.enseeiht.fr/mailman/listinfo/topcased-users