Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [xPand] No protected region resolver configured
[xPand] No protected region resolver configured [message #489273] Fri, 02 October 2009 08:20 Go to next message
Federico Tomassetti is currently offline Federico Tomassetti
Messages: 186
Registered: July 2009
Location: Torino
Senior Member

When I use protected regions I get this error:

GRAVE: Error in Component of type org.eclipse.xpand2.Generator:
EvaluationException : No protected region resolver configured!
template::Template2.xpt[232,83] on line 13 'org.eclipse.internal.xpand2.ast.ProtectStatement@1b54eb0'
template::Template2.xpt[68,47] on line 5 'EXPAND xElement FOREACH this.allOwnedElements()'
[23,45] on line 1 'EXPAND template::Template2::main FOR umlModel'

This is the template I am using:

«IMPORT uml»
«IMPORT UWE_Profile»

«DEFINE main FOR uml::Package»
«EXPAND xElement FOREACH this.allOwnedElements()»
«FILE "gino.txt"»
Ciao!
«ENDFILE»»
«ENDDEFINE»

«DEFINE xElement FOR uml::Class»
«FILE this.name + ".java"»
«PROTECT CSTART "/*" CEND "*/" ID this.name»
here goes some content
«ENDPROTECT»
class «this.name» {
}
«ENDFILE»
«ENDDEFINE»

«DEFINE xElement FOR uml::NamedElement»
«FILE this.name + ".txt"»
Else: «this.name»
«ENDFILE»
«ENDDEFINE»

«DEFINE xElement FOR uml::Element»
«ENDDEFINE»


Federico


Re: [xPand] No protected region resolver configured [message #489295 is a reply to message #489273] Fri, 02 October 2009 09:40 Go to previous messageGo to next message
ekkehard gentz is currently offline ekkehard gentz
Messages: 118
Registered: July 2009
Location: rosenheim, Germany, bavar...
Senior Member

This is a multi-part message in MIME format.
--------------050807040806000902000802
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

your Xpand2.Generator component must know about protected regions
you need something like:

<prSrcPaths
value=" ${outlet.src.pr.dir},${outlet.mock.src.pr.dir},${outlet.sear ch.bean.src.pr.dir} "/>
<prExcludes value=", *.xml, *.hbm"/>

ekke

Federico Tomassetti schrieb:
> When I use protected regions I get this error:
>
> GRAVE: Error in Component of type org.eclipse.xpand2.Generator:
> EvaluationException : No protected region resolver configured!
> template::Template2.xpt[232,83] on line 13
> mailto:'org.eclipse.internal.xpand2.ast.ProtectStatement@1b54eb0'
> template::Template2.xpt[68,47] on line 5 'EXPAND xElement FOREACH
> this.allOwnedElements()' [23,45] on line 1 'EXPAND
> template::Template2::main FOR umlModel'
>
> This is the template I am using:
>
> «IMPORT uml»
> «IMPORT UWE_Profile»
>
> «DEFINE main FOR uml::Package»
> «EXPAND xElement FOREACH this.allOwnedElements()» «FILE
> "gino.txt"»
> Ciao!
> «ENDFILE»»
> «ENDDEFINE»
>
> «DEFINE xElement FOR uml::Class»
> «FILE this.name + ".java"»
> «PROTECT CSTART "/*" CEND "*/" ID this.name»
> here goes some content
> «ENDPROTECT»
> class «this.name» {
> }
> «ENDFILE»
> «ENDDEFINE»
>
> «DEFINE xElement FOR uml::NamedElement»
> «FILE this.name + ".txt"»
> Else: «this.name»
> «ENDFILE»
> «ENDDEFINE»
>
> «DEFINE xElement FOR uml::Element»
> «ENDDEFINE»
>
>
> Federico


--

ekke (ekkehard gentz)
independent software-architect
senior erp-consultant
eclipse | osgi | equinox | mdsd | oaw | emf | uml
max-josefs-platz 30, D-83022 rosenheim, germany
mailto:ekke@ekkes-corner.org
homepage (de): http://gentz-software.de
blog (en): http://ekkes-corner.org
twitter: @ekkescorner
skype: ekkes-corner
Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490


--------------050807040806000902000802
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
your Xpand2.Generator component must know about protected regions<br>
you need something like:<br>
<br>
        &lt;prSrcPaths
value=" ${outlet.src.pr.dir},${outlet.mock.src.pr.dir},${outlet.sear ch.bean.src.pr.dir} "/&gt;<br>
        &lt;prExcludes value=", *.xml, *.hbm"/&gt;<br>
<br>
ekke<br>
<br>
Federico Tomassetti schrieb:
<blockquote cite="mid:ha4d4i$6jv$1@build.eclipse.org" type="cite">When
I use protected regions I get this error:
<br>
<br>
GRAVE: Error in Component  of type org.eclipse.xpand2.Generator:
    EvaluationException : No protected region resolver configured!
<br>
    template::Template2.xpt[232,83] on line 13
<a class="moz-txt-link-freetext" href="mailto:'org.eclipse.internal.xpand2.ast.ProtectStatement@1b54eb0">mailto:'org.eclipse.internal.xpand2.ast.ProtectStatement@1b54eb0</a>'
<br>
    template::Template2.xpt[68,47] on line 5 'EXPAND xElement FOREACH
this.allOwnedElements()'               [23,45] on line 1 'EXPAND
template::Template2::main FOR umlModel'
<br>
<br>
This is the template I am using:
<br>
<br>
«IMPORT uml»
<br>
«IMPORT UWE_Profile»
<br>
<br>
«DEFINE main FOR uml::Package»
<br>
    «EXPAND xElement FOREACH this.allOwnedElements()»     «FILE
"gino.txt"»
<br>
        Ciao!
<br>
    «ENDFILE»»
<br>
«ENDDEFINE»
<br>
<br>
«DEFINE xElement FOR uml::Class»
<br>
«FILE this.name + ".java"»
<br>
    «PROTECT CSTART "/*" CEND "*/" ID this.name»
<br>
       here goes some content
<br>
    «ENDPROTECT»
<br>
    class «this.name» {
<br>
    }
<br>
«ENDFILE»
<br>
«ENDDEFINE»
<br>
<br>
«DEFINE xElement FOR uml::NamedElement»
<br>
«FILE this.name + ".txt"»
<br>
Else: «this.name»
<br>
«ENDFILE»
<br>
«ENDDEFINE»
<br>
<br>
«DEFINE xElement FOR uml::Element»
<br>
«ENDDEFINE»
<br>
<br>
<br>
Federico
<br>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<p style="margin-bottom: 0cm;"> <font ,="" color="#808080"
face="Verdana, sans-serif"> <font size="4">ekke (ekkehard gentz)<br>
</font> <font size="3"> independent software-architect<br>
senior erp-consultant<br>
</font> <font size="2">eclipse | osgi | equinox | mdsd | oaw | emf |
uml<br>
max-josefs-platz 30, D-83022 rosenheim, germany<br>
<a class="moz-txt-link-freetext" href="mailto:ekke@ekkes-corner.org">mailto:ekke@ekkes-corner.org</a><br>
homepage (de): <a class="moz-txt-link-freetext" href="http://gentz-software.de">http://gentz-software.de</a><br>
blog (en): <a class="moz-txt-link-freetext" href="http://ekkes-corner.org">http://ekkes-corner.org</a><br>
twitter: @ekkescorner<br>
skype: ekkes-corner<br>
</font> <font size="1"> Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID:
DE189929490<br>
</font> </font> </p>
</div>
</body>
</html>

--------------050807040806000902000802--


ekke
independent software architect

blog: http://ekkes-corner.org
twitter: @ekkescorner
Re: [xPand] No protected region resolver configured [message #489322 is a reply to message #489273] Fri, 02 October 2009 12:29 Go to previous messageGo to next message
Federico Tomassetti is currently offline Federico Tomassetti
Messages: 186
Registered: July 2009
Location: Torino
Senior Member

Thank you, but where I have to put this configuration line?

Re: [xPand] No protected region resolver configured [message #489337 is a reply to message #489322] Fri, 02 October 2009 13:40 Go to previous message
ekkehard gentz is currently offline ekkehard gentz
Messages: 118
Registered: July 2009
Location: rosenheim, Germany, bavar...
Senior Member

This is a multi-part message in MIME format.
--------------070807050906010606030605
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Federico Tomassetti schrieb:
> Thank you, but where I have to put this configuration line?
its a parameter of Xpand2.Generator component from your workflow file (MWE)

--

ekke (ekkehard gentz)
independent software-architect
senior erp-consultant
eclipse | osgi | equinox | mdsd | oaw | emf | uml
max-josefs-platz 30, D-83022 rosenheim, germany
mailto:ekke@ekkes-corner.org
homepage (de): http://gentz-software.de
blog (en): http://ekkes-corner.org
twitter: @ekkescorner
skype: ekkes-corner
Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490


--------------070807050906010606030605
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Federico Tomassetti schrieb:
<blockquote cite="mid:ha4rnk$f2m$1@build.eclipse.org" type="cite">Thank
you, but where I have to put this configuration line?
<br>
</blockquote>
its a parameter of Xpand2.Generator component from your workflow file
(MWE)<br>
<br>
<div class="moz-signature">-- <br>
<p style="margin-bottom: 0cm;"> <font ,="" color="#808080"
face="Verdana, sans-serif"> <font size="4">ekke (ekkehard gentz)<br>
</font> <font size="3"> independent software-architect<br>
senior erp-consultant<br>
</font> <font size="2">eclipse | osgi | equinox | mdsd | oaw | emf |
uml<br>
max-josefs-platz 30, D-83022 rosenheim, germany<br>
<a class="moz-txt-link-freetext" href="mailto:ekke@ekkes-corner.org">mailto:ekke@ekkes-corner.org</a><br>
homepage (de): <a class="moz-txt-link-freetext" href="http://gentz-software.de">http://gentz-software.de</a><br>
blog (en): <a class="moz-txt-link-freetext" href="http://ekkes-corner.org">http://ekkes-corner.org</a><br>
twitter: @ekkescorner<br>
skype: ekkes-corner<br>
</font> <font size="1"> Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID:
DE189929490<br>
</font> </font> </p>
</div>
</body>
</html>

--------------070807050906010606030605--


ekke
independent software architect

blog: http://ekkes-corner.org
twitter: @ekkescorner
Previous Topic:Check editor problems
Next Topic:Xpand: Share generator workflows as IDE plug-ins
Goto Forum:
  


Current Time: Wed Oct 01 20:36:55 GMT 2014

Powered by FUDForum. Page generated in 0.15817 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software