Home » Archived » GMT (Generative Modeling Technologies) » [MOFScript] Java Integration - Parse Error
[MOFScript] Java Integration - Parse Error [message #378270] |
Tue, 26 June 2007 19:26 |
Eclipse User |
|
|
|
Originally posted by: chhirsch.rumms.uni-mannheim.de
Hi everybody,
i'm getting a Parse Error, when trying to parse a MOFScript Transformation
using the MOFScript Java API.
Somehow the imports declared in the transformation can not be found.
When executing the transformation within Eclipse, everything is fine.
I also tried to convert the imported transformations into model-format
before executing the program.
I have the three following m2t-files in the same folder:
OMEGA.m2t
Web.m2t
CMS.m2t
OMEGA.m2t contains the following code:
texttransformation OMEGA (in uml:"http://www.eclipse.org/uml2/2.0.0/UML") {
access library aName "Web.m2t"
access library aName "CMS.m2t"
uml.Class::main () {
self.mapWebClasses()
self.mapCMSClasses()
}
}
The transformation rules mapWebClasses() and mapCMSClasses()
are declared in the imported transformations.
By using the following java code, i'm trying to parse this file:
MOFScriptSpecification spec = parserUtil.parse(new File(
" C:\\eclipse\\workspace\\omega.test.plugin.codegeneratorMOFSc ript\\src\\temp
lates\\OMEGA.m2t"), true);
I'm getting the following errors:
Parsing result: 4 errors
2007-06-26 20:49:57,202 [Worker-2] ERROR
(omega.test.plugin.codegeneratorMOFScript.base.MOFScriptCode Generator:76)
: Error: MTTParseError: Cannot find import: Web.m2t, line: 10, column: 9
2007-06-26 20:49:57,202 [Worker-2] ERROR
(omega.test.plugin.codegeneratorMOFScript.base.MOFScriptCode Generator:76)
: Error: MTTParseError: Cannot find import: CMS.m2t, line: 16, column: 6
2007-06-26 20:49:57,202 [Worker-2] ERROR
(omega.test.plugin.codegeneratorMOFScript.base.MOFScriptCode Generator:76)
: Error: MTTParseError: Undefined function call: mapWebClasses, line: 20,
column: 7
2007-06-26 20:49:57,202 [Worker-2] ERROR
(omega.test.plugin.codegeneratorMOFScript.base.MOFScriptCode Generator:76)
: Error: MTTParseError: Undefined function call: mapCMSClasses, line: 22,
column: 4
Does anybody have any ideas, what could be wrong here?
Thanks,
Christian
|
|
|
Re: [MOFScript] Java Integration - Parse Error [message #378272 is a reply to message #378270] |
Wed, 27 June 2007 12:17 |
Eclipse User |
|
|
|
Originally posted by: angel.calvo.centic.es
Hi,
Try this before call parseUtil.parse:
parserUtil.setCompilePath(templatesDir);
Where templatesDir is a string with templates dir path,
Regards.
Christian Hirsch escribió:
> Hi everybody,
>
> i'm getting a Parse Error, when trying to parse a MOFScript Transformation
> using the MOFScript Java API.
> Somehow the imports declared in the transformation can not be found.
> When executing the transformation within Eclipse, everything is fine.
> I also tried to convert the imported transformations into model-format
> before executing the program.
>
> I have the three following m2t-files in the same folder:
>
> OMEGA.m2t
> Web.m2t
> CMS.m2t
>
>
> OMEGA.m2t contains the following code:
>
> texttransformation OMEGA (in uml:"http://www.eclipse.org/uml2/2.0.0/UML") {
> access library aName "Web.m2t"
> access library aName "CMS.m2t"
> uml.Class::main () {
> self.mapWebClasses()
> self.mapCMSClasses()
> }
> }
>
> The transformation rules mapWebClasses() and mapCMSClasses()
> are declared in the imported transformations.
>
> By using the following java code, i'm trying to parse this file:
>
> MOFScriptSpecification spec = parserUtil.parse(new File(
> " C:\\eclipse\\workspace\\omega.test.plugin.codegeneratorMOFSc ript\\src\\temp
> lates\\OMEGA.m2t"), true);
>
> I'm getting the following errors:
>
> Parsing result: 4 errors
> 2007-06-26 20:49:57,202 [Worker-2] ERROR
> (omega.test.plugin.codegeneratorMOFScript.base.MOFScriptCode Generator:76)
> : Error: MTTParseError: Cannot find import: Web.m2t, line: 10, column: 9
> 2007-06-26 20:49:57,202 [Worker-2] ERROR
> (omega.test.plugin.codegeneratorMOFScript.base.MOFScriptCode Generator:76)
> : Error: MTTParseError: Cannot find import: CMS.m2t, line: 16, column: 6
> 2007-06-26 20:49:57,202 [Worker-2] ERROR
> (omega.test.plugin.codegeneratorMOFScript.base.MOFScriptCode Generator:76)
> : Error: MTTParseError: Undefined function call: mapWebClasses, line: 20,
> column: 7
> 2007-06-26 20:49:57,202 [Worker-2] ERROR
> (omega.test.plugin.codegeneratorMOFScript.base.MOFScriptCode Generator:76)
> : Error: MTTParseError: Undefined function call: mapCMSClasses, line: 22,
> column: 4
>
> Does anybody have any ideas, what could be wrong here?
>
> Thanks,
> Christian
>
>
|
|
|
Re: [MOFScript] Java Integration - Parse Error [message #378415 is a reply to message #378272] |
Thu, 28 June 2007 09:09 |
Eclipse User |
|
|
|
Originally posted by: chhirsch.rumms.uni-mannheim.de
Thanks, it's working now.
By the way, is there a MOFScript Java API Documentation available somewhere?
I didn't find one through Google Search.
Greetings, Christian
"Angel Luis Calvo Ortega" <angel.calvo@centic.es> schrieb im Newsbeitrag
news:f5tkg2$2ap$1@build.eclipse.org...
> Hi,
>
> Try this before call parseUtil.parse:
>
> parserUtil.setCompilePath(templatesDir);
>
> Where templatesDir is a string with templates dir path,
>
> Regards.
>
> Christian Hirsch escribi
|
|
| |
Re: [MOFScript] Java Integration - Parse Error [message #602124 is a reply to message #378270] |
Wed, 27 June 2007 12:17 |
Eclipse User |
|
|
|
Originally posted by: angel.calvo.centic.es
Hi,
Try this before call parseUtil.parse:
parserUtil.setCompilePath(templatesDir);
Where templatesDir is a string with templates dir path,
Regards.
Christian Hirsch escribió:
> Hi everybody,
>
> i'm getting a Parse Error, when trying to parse a MOFScript Transformation
> using the MOFScript Java API.
> Somehow the imports declared in the transformation can not be found.
> When executing the transformation within Eclipse, everything is fine.
> I also tried to convert the imported transformations into model-format
> before executing the program.
>
> I have the three following m2t-files in the same folder:
>
> OMEGA.m2t
> Web.m2t
> CMS.m2t
>
>
> OMEGA.m2t contains the following code:
>
> texttransformation OMEGA (in uml:"http://www.eclipse.org/uml2/2.0.0/UML") {
> access library aName "Web.m2t"
> access library aName "CMS.m2t"
> uml.Class::main () {
> self.mapWebClasses()
> self.mapCMSClasses()
> }
> }
>
> The transformation rules mapWebClasses() and mapCMSClasses()
> are declared in the imported transformations.
>
> By using the following java code, i'm trying to parse this file:
>
> MOFScriptSpecification spec = parserUtil.parse(new File(
> " C:\\eclipse\\workspace\\omega.test.plugin.codegeneratorMOFSc ript\\src\\temp
> lates\\OMEGA.m2t"), true);
>
> I'm getting the following errors:
>
> Parsing result: 4 errors
> 2007-06-26 20:49:57,202 [Worker-2] ERROR
> (omega.test.plugin.codegeneratorMOFScript.base.MOFScriptCode Generator:76)
> : Error: MTTParseError: Cannot find import: Web.m2t, line: 10, column: 9
> 2007-06-26 20:49:57,202 [Worker-2] ERROR
> (omega.test.plugin.codegeneratorMOFScript.base.MOFScriptCode Generator:76)
> : Error: MTTParseError: Cannot find import: CMS.m2t, line: 16, column: 6
> 2007-06-26 20:49:57,202 [Worker-2] ERROR
> (omega.test.plugin.codegeneratorMOFScript.base.MOFScriptCode Generator:76)
> : Error: MTTParseError: Undefined function call: mapWebClasses, line: 20,
> column: 7
> 2007-06-26 20:49:57,202 [Worker-2] ERROR
> (omega.test.plugin.codegeneratorMOFScript.base.MOFScriptCode Generator:76)
> : Error: MTTParseError: Undefined function call: mapCMSClasses, line: 22,
> column: 4
>
> Does anybody have any ideas, what could be wrong here?
>
> Thanks,
> Christian
>
>
|
|
|
Re: [MOFScript] Java Integration - Parse Error [message #602194 is a reply to message #378272] |
Thu, 28 June 2007 09:09 |
Eclipse User |
|
|
|
Originally posted by: chhirsch.rumms.uni-mannheim.de
Thanks, it's working now.
By the way, is there a MOFScript Java API Documentation available somewhere?
I didn't find one through Google Search.
Greetings, Christian
"Angel Luis Calvo Ortega" <angel.calvo@centic.es> schrieb im Newsbeitrag
news:f5tkg2$2ap$1@build.eclipse.org...
> Hi,
>
> Try this before call parseUtil.parse:
>
> parserUtil.setCompilePath(templatesDir);
>
> Where templatesDir is a string with templates dir path,
>
> Regards.
>
> Christian Hirsch escribi
|
|
| |
Goto Forum:
Current Time: Thu Apr 25 00:27:25 GMT 2024
Powered by FUDForum. Page generated in 0.04259 seconds
|