<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
>
<!-- MHonArc v2.6.10 -->
	<channel>
		<title>news.eclipse.modeling.tmf</title>
		<link>http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/maillist.html</link>
		<description>NewsGroup: news.eclipse.modeling.tmf</description>
		<language>en-us</language>
		<pubDate>Fri, 18 Sep 2009 16:40:27 GMT</pubDate>
		<lastBuildDate>Fri, 18 Sep 2009 16:40:27 GMT</lastBuildDate>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<generator>MHonArc RSS 2.0 RCFile</generator>
		<managingEditor>webmaster@eclipse.org (Webmaster)</managingEditor>
		<webMaster>webmaster@eclipse.org (Webmaster)</webMaster>
		<image>
			<title>news.eclipse.modeling.tmf</title>
			<url>http://www.eclipse.org/eclipse.org-common/themes/Phoenix/images/eclipse_home_header.jpg</url>
			<link>http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/maillist.html</link>
		</image>
 

	<item>
		<title>[news.eclipse.modeling.tmf] how to migrate an existing antlr	grammar to xtext</title>
		<link>http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/msg02359.html</link>
		<description>Hi, Currently, I have an existing grammar for my DSL, how can I make use of it in xtext? Do I have to translate the grammar to xtext grammar? or some way else to use it directly </description>
		<content:encoded><![CDATA[<pre style="margin: 0em;">Hi,</pre><br>
<pre style="margin: 0em;">Currently, I have an existing grammar for my DSL, how can I make use of it
in xtext?
Do I have to translate the grammar to xtext grammar? or some way else to use
it directly</pre><br>
<pre style="margin: 0em;"><br></pre><br>
<br>
]]></content:encoded>
		<pubDate>Fri, 18 Sep 2009 16:27:31 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/msg02359.html</guid>
		<author>chenruis@xxxxxxx (ChenRui)</author>
	</item>
	<item>
		<title>[news.eclipse.modeling.tmf] How to use xtext editing inside a field	of a dialog?</title>
		<link>http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/msg02358.html</link>
		<description>Hi, I'd like to use my language editor inside a dialog for a field (content assist etc). Essentially, I would give the field a EMF model and the field should edit the with the xtext content assist and error handling. Is this possible? Michael -- Michael Sc...</description>
		<content:encoded><![CDATA[<pre style="margin: 0em;">Hi,</pre><br>
<pre style="margin: 0em;">I'd like to use my language editor inside a
dialog for a field (content assist etc).</pre><br>
<pre style="margin: 0em;">Essentially, I would give the field a EMF model
and the field should edit the with the xtext
content assist and error handling.</pre><br>
<pre style="margin: 0em;">Is this possible?</pre><br>
<pre style="margin: 0em;">Michael
--
Michael Scharf
Wind River Systems GmbH
<a  href="http://www.WindRiver.com">http://www.WindRiver.com</a>
<a  href="http://MichaelScharf.blogspot.com/">http://MichaelScharf.blogspot.com/</a></pre><br>
]]></content:encoded>
		<pubDate>Fri, 18 Sep 2009 14:32:21 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/msg02358.html</guid>
		<author>eclipse-newsgroups@xxxxxxx (Michael Scharf)</author>
	</item>
	<item>
		<title>[news.eclipse.modeling.tmf] Re: [XText] serialize parsed tree to	String</title>
		<link>http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/msg02357.html</link>
		<description>Hi Michael, I'm glad to hear you found the issue :) You are my best friend when you'll deploy the current version of XText to the Maven2 repository [http://openarchitectureware.org/m2/]. Could you start a new discussion thread for this? I'm not affiliated ...</description>
		<content:encoded><![CDATA[<pre style="margin: 0em;">Hi Michael,</pre><br>
<br>
<blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><tt>omfg, you are right. Input was &quot;-1&quot; and '-' was not in the definition of 
INT.<br>
I've overwrite it with</tt><br>
<br>
<pre style="margin: 0em;">terminal INT returns ecore::EInt: '-'?('0'..'9')+;</pre><br>
<tt>and everything was fine. Argh, sorry. The INT in XText is just NAT ;-)
</tt></blockquote><pre style="margin: 0em;"><br>I'm glad to hear you found the issue :)</pre><br>
<blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><tt>That was a bug in Xtext in the 0.7.2-release.
</tt></blockquote><tt>You are my best friend when you'll deploy the current version of XText 
to the<br>
Maven2 repository [<a  href="http://openarchitectureware.org/m2/">http://openarchitectureware.org/m2/</a>].
</tt></blockquote><tt><br>Could you start a new discussion thread for this? I'm not affiliated 
with the Maven2 repository and since this thread already got very 
specialized towards the serialization issue, people who could answer the 
Maven2 question won't necessarily read it.</tt><br>
<br>
<pre style="margin: 0em;">regards,
  Moritz</pre><br>
<blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;"><br>--- Original-Nachricht ---
Absender: Moritz Eysholdt
Datum: 16.09.2009 22:18
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><tt>Hi Michael,
</tt><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><tt>you are right, was not the correct line, but a very similar. The 
source is long and the corresponding exception print out is much longer.</tt><br>
<br>
<pre style="margin: 0em;">But, back to topic.</pre><br>
<pre style="margin: 0em;">If I try this [1], I got an exception in line 11.</pre><br>
<tt>Exception: 
org.eclipse.xtext.parsetree.reconstr.XtextSerializationException: 
Serialization failed</tt><br>
<br>
<tt>But why?
</tt></blockquote><tt>Generally speaking, this happens when your model contains values that 
are not written during serialization or when your model does *not* 
contain values that are required for serialization. Your grammar 
specifies which values these are. But since your are serializing the 
model right after you've parsed it, I guess that you haven't added any 
model elements in the meantime, right? One could do things like that 
in the Linker, for example. In case there is multiple inheritance in 
your Ecore model, this is likely to be the reason. That was a bug in 
Xtext in the 0.7.2-release. Updating to a newer release can help.</tt><br>
<br>
<blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><tt>Model checked and OK.
</tt></blockquote><pre style="margin: 0em;">OK.</pre><br>
<blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><tt>Parsing OK.
</tt></blockquote><tt>To be sure parsing is *really* OK, please check whether 
resource.getWarnings() and resource.getErrors() are empty after 
calling resource.load().</tt><br>
<br>
<br>
<blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><tt>Am I right, that Resource.load() is for parsing and Resource.save() 
for serialization?
</tt></blockquote><pre style="margin: 0em;"><br>Yes.</pre><br>
<tt>If my answers don't tackle your problem, please post your grammar and 
the textual model you've been parsing.</tt><br>
<br>
<pre style="margin: 0em;">cheers,
  Moritz</pre><br>
<blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><tt>[1] - java code<br>
---------------<br>
line  1: Injector injector = new 
DslStandaloneSetup().createInjectorAndDoEMFRegistration();<br>
line  2: XtextResourceSet xtextResourceSet = 
injector.getInstance(XtextResourceSet.class);<br>
line  3: 
xtextResourceSet.addLoadOption(XtextResource.OPTION_RESOLVE_ALL, 
Boolean.TRUE);<br>
line  4: Map&lt;?, ?&gt; options = xtextResourceSet.getLoadOptions();<br>
line  5: URI dslResource = 
org.eclipse.emf.common.util.URI.createURI(&quot;platform:/resource/dummy.dsl&quot;); </tt><br>
<br>
<tt>line  6: Resource resource = 
xtextResourceSet.createResource(dslResource);<br>
line  7: InputStream in = new ByteArrayInputStream(dslCode.getBytes());<br>
line  8: resource.load(in, xtextResourceSet.getLoadOptions());<br>
line  9: ret = (Model) resource.getContents().get(0);<br>
line 10: ByteArrayOutputStream bos = new ByteArrayOutputStream();<br>
line 11: resource.save(bos, options);<br>
==== end ====</tt><br>
<br>
<pre style="margin: 0em;"><br></pre><br>
<pre style="margin: 0em;">--- Original-Nachricht ---
Absender: Moritz Eysholdt
Datum: 14.09.2009 16:15
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">Hi Michael,</pre><br>
<tt>what you are listing below is actually an error message and *not* 
your serialized model. However, this error message contains 
fragments of your serialized model.</tt><br>
<br>
<tt>Are you sure the message resulted from serializing the model from 
parsing &quot;$varname = 5;&quot;?</tt><br>
<br>
<tt>The message contains the serialized part of your model:<br>
&quot;] = $current ; $message = &quot;square root found&quot; ; } }&quot;<br>
And this doesn't look to me like it has originated from &quot;$varname = 
5;&quot;.</tt><br>
<br>
<pre style="margin: 0em;">regards,
  Moritz</pre><br>
<blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">Hi Sebastian,</pre><br>
<pre style="margin: 0em;"><br>ok, I've got it running, but not in a way I want.</pre><br>
<tt>Parsing and serialization are divided into two classes in my 
implementation. Thats the reason why XtextResourceSet.getResource() 
reports: &quot;resource was not registered&quot;.</tt><br>
<br>
<tt><br>If I merge the methods, I got a different serialization as I hoped 
for.<br>
I put into the parser a line like this:</tt><br>
<br>
<pre style="margin: 0em;"> $varname = 5;</pre><br>
<tt>after parsing and serializing I got something like that:<br>
======<br>
scripts[0] = Assign {<br>
 variable = 
Variable(name='de.btopia.ghandara.charme.impl.VariableNameImpl@55eb1db2 
(name: $result)') {<br>
  69: &quot;] = $current ; $message = &quot;square root found&quot; ; } }...&quot;:<br>
   -&gt; Variable_IndexAssignment_1_1: Variable.index is not set.<br>
  68: &quot;= $current ; $message = &quot;square root found&quot; ; } } }...&quot;:<br>
   -&gt; Variable_PropertyAssignment_2_1: Variable.property is not set.<br>
  }<br>
  value = Expression {<br>
  headTerm = IntegerConst(...<br>
====<br>
OK, I found no easy-to-read code snipplet. Sorry. I can give you 
much more complex examples.</tt><br>
<br>
<tt>But first, the Injector needs an inject with the registered 
resources. The use cases (parse and serialize) can be made 
independent from each other. The parsed model has all information 
about the original DSL code. There is no need to store resource 
URIs _OR_ the authority for registration resources is unique in the 
whole system.</tt><br>
<br>
<tt>But in my case:<br>
How can I reach my simple DSL code line &quot;$varname = 5;&quot; from 
serialization?</tt><br>
<br>
<pre style="margin: 0em;"><br>Ciao, Micha</pre><br>
<pre style="margin: 0em;"><br></pre><br>
<pre style="margin: 0em;"><br></pre><br>
<pre style="margin: 0em;">--- Original-Nachricht ---
Absender: Sebastian Zarnekow
Datum: 11.09.2009 18:17
</pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">Hi Michael,</pre><br>
<pre style="margin: 0em;">your resource is emtpy and has not been loaded.</pre><br>
<pre style="margin: 0em;">Please try something like:</pre><br>
<tt>Resource res = resourceSet.getResource(URI.createURI(..existing 
uri..));<br>
res.save(..);</tt><br>
<br>
<tt>resourceSet.createResource will create a new resource but won't 
load it.</tt><br>
<br>
<pre style="margin: 0em;">res = resourceSet.createResource(..uri..);
res.load(new StringInputStream(&quot;valid model&quot;));
res.save(..)</pre><br>
<pre style="margin: 0em;">should do the trick as well.</pre><br>
<pre style="margin: 0em;">Hope that helps,
Sebastian
</pre></blockquote></blockquote><pre style="margin: 0em;"><br></pre><br>
</blockquote></blockquote><pre style="margin: 0em;"><br></pre><br>
</blockquote></blockquote><pre style="margin: 0em;"><br></pre><br>
<pre style="margin: 0em;">--
Need professional support for Eclipse Modeling?
Go visit: <a  href="http://xtext.itemis.com">http://xtext.itemis.com</a></pre><br>
]]></content:encoded>
		<pubDate>Fri, 18 Sep 2009 14:15:00 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/msg02357.html</guid>
		<author>moritz.eysholdt@xxxxxxx (Moritz Eysholdt)</author>
	</item>
	<item>
		<title>[news.eclipse.modeling.tmf] Re: Cross reference</title>
		<link>http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/msg02356.html</link>
		<description>Hi ouakib, afaik you can restrict the reference to attributes of the same class by providing your own ScopeProvider (see [1]). Here is some pseudo code, hope it helps: public IScope scope_Attribute_name(Attribute context, EReference reference){ // get all ...</description>
		<content:encoded><![CDATA[<pre style="margin: 0em;">Hi ouakib,</pre><br>
<pre style="margin: 0em;">afaik you can restrict the reference to attributes of the same class by providing your own ScopeProvider (see [1]). Here is some pseudo code, hope it helps:</pre><br>
<pre style="margin: 0em;">public IScope scope_Attribute_name(Attribute context, EReference reference){</pre><br>
<pre style="margin: 0em;">	// get all elements of the class
	EList&lt;Element&gt; elements = ((Class)context.eContainer).getElt();</pre><br>
<pre style="margin: 0em;">	// get attributes
	Collection&lt;Attribute&gt; attributes = EcoreUtil.getObjectsByType(elements, YourDSLPackage.eINSTANCE.getAttribute());</pre><br>
<pre style="margin: 0em;">	Iterable&lt;IScopedElement&gt; scopedElements = Scopes.scopedElementsFor(attributes, new Function&lt;EObject, String&gt;() {
		public String apply(EObject from) {
			return (((Attribute)from).getName());
		}
	});
		
	return new SimpleScope(IScope.NULLSCOPE, scopedElements);
}</pre><br>
<pre style="margin: 0em;">Regards,
ILyas</pre><br>
<pre style="margin: 0em;">------
[1] <a  href="http://www.eclipse.org/Xtext/documentation/0_7_2/xtext.html#scoping">http://www.eclipse.org/Xtext/documentation/0_7_2/xtext.html#scoping</a></pre><br>
<tt><br>ouakib schrieb:
</tt><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">Hi all ,
this is my grammar :</pre><br>
<pre style="margin: 0em;">Root: (root+=Model)* ;
Class: &quot;class&quot; name=ID (elt+=Element)*  ;
Element : Attribute | Ref ;
Attribute : &quot;var&quot; name=ID ;
Ref : &quot;ref&quot; name=[Attribute|ID] ;</pre><br>
<tt>the attribute &quot;name&quot; in the element &quot;Ref&quot;  references all the elements 
&quot;Attribute&quot;  in the model How I can restrict this reference to reference 
only the &quot;Attributres &quot; which exists in then same  &quot;Class&quot;<br>
for instance in this model :</tt><br>
<br>
<pre style="margin: 0em;">class class1
    var var1     var var2
class class 2
   var var3
  var var4
  ref  var1</pre><br>
<tt>the reference to var1 from class2  must not work  because var1 must be 
in class1.
</tt></blockquote><br>
]]></content:encoded>
		<pubDate>Fri, 18 Sep 2009 11:08:41 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/msg02356.html</guid>
		<author>ilyas.keser@xxxxxxx (Ilyas Keser)</author>
	</item>
	<item>
		<title>[news.eclipse.modeling.tmf] Cross reference</title>
		<link>http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/msg02355.html</link>
		<description>Hi all , this is my grammar : Root: (root+=Model)* ; Class: &amp;quot;class&amp;quot; name=ID (elt+=Element)* ; Element : Attribute | Ref ; Attribute : &amp;quot;var&amp;quot; name=ID ; Ref : &amp;quot;ref&amp;quot; name=[Attribute|ID] ; the attribute &amp;quot;name&amp;quot; in the element &amp;quot;Ref&amp;quot; references all the elements uo...</description>
		<content:encoded><![CDATA[<pre style="margin: 0em;">Hi all ,
this is my grammar :</pre><br>
<pre style="margin: 0em;">Root: (root+=Model)* ;
Class: &quot;class&quot; name=ID (elt+=Element)*  ;
Element : Attribute | Ref ;
Attribute : &quot;var&quot; name=ID ;
Ref : &quot;ref&quot; name=[Attribute|ID] ;</pre><br>
<tt>the attribute &quot;name&quot; in the element &quot;Ref&quot;  references all the elements &quot;Attribute&quot;  in the model 
How I can restrict this reference to reference only the &quot;Attributres &quot; which exists in then same  &quot;Class&quot;<br>
for instance in this model :</tt><br>
<br>
<tt>class class1<br>
    var var1 
    var var2<br>
class class 2<br>
   var var3<br>
  var var4<br>
  ref  var1</tt><br>
<br>
<pre style="margin: 0em;">the reference to var1 from class2  must not work  because var1 must be in class1.</pre><br>
]]></content:encoded>
		<pubDate>Fri, 18 Sep 2009 10:02:41 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/msg02355.html</guid>
		<author>m.ouakib@xxxxxxx (ouakib)</author>
	</item>
	<item>
		<title>[news.eclipse.modeling.tmf] Re: looking for a xtext C/Java like	expression language</title>
		<link>http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/msg02354.html</link>
		<description> </description>
		<content:encoded><![CDATA[<pre>Here are the relevant parts of the code:

@Override
public void createProposals(ContentAssistContext context, 
ICompletionProposalAcceptor acceptor)
{
 final EObject currentModel = context.getCurrentModel();
 final AbstractNode currentNode = context.getCurrentNode();
 LeafNode leafNode = null;
 if(currentNode instanceof LeafNode)
 {
  leafNode = (LeafNode) currentNode;
 }

 if(context.getOffset() &lt;= ParsetreeUtil.getOffset(currentNode) || 
currentModel == null)
 {
  super.createProposals(context, acceptor);
  return;
 }

 final TemplateMetaModel metaModel = new TemplateMetaModel();
 final ExecutionContextImpl ctx = new ExecutionContextImpl(new 
TypeSystemImpl());
 ctx.registerMetaModel(metaModel);

 final Type contextType = getContextType(currentModel, metaModel, ctx);
 if(contextType == null)
  return;
 createXtendProposals(context, acceptor, contextType);
}

protected Type getContextType(EObject element, EmfRegistryMetaModel 
metaModel, ExecutionContext ectx)
{
 while (true)
 {
  if(element == null)
   return null;

  if(element instanceof Template)
   return metaModel.getTypeForEClassifier(((Template) 
element).getModelElement().getClassifier());

  if(element instanceof TemplatePart)
   return metaModel.getTypeForEClassifier(((TemplatePart) 
element).getContextElement());

  ...
 
  element = element.eContainer();
 }
}

protected void createXtendProposals(ContentAssistContext context, 
ICompletionProposalAcceptor acceptor,
    Type contextType)
{
  final int cursorOffset = context.getOffset();
  final int nodeOffset = ParsetreeUtil.getOffset(context.getCurrentNode());

  // get relevant part of the document
  String part = context.getViewer().getDocument().get().substring(nodeOffset 
+ 1, cursorOffset);

  // prepare factory + extensions
  final ProposalFactory factory = new 
ProposalFactoryEclipseImpl(cursorOffset);
  final List&lt;Extension&gt; extensions = new ArrayList&lt;Extension&gt;();
  // prepare context
  ExecutionContext ctx = new ExecutionContextImpl();
  final TemplateMetaModel mm = new TemplateMetaModel();
  ((ExecutionContextImpl) ctx).registerMetaModel(mm);
  ctx = ctx.cloneWithVariable(new 
Variable(ExecutionContext.IMPLICIT_VARIABLE, contextType));

  ctx = ctx.cloneWithResource(new Resource()
  {
    public String getFullyQualifiedName()
    {
	return null;
    }

    public void setFullyQualifiedName(final String fqn)
    {
	// empty
    }

    public String[] getImportedNamespaces()
    {
	return new String[0];
    }

    public String[] getImportedExtensions()
    {
	return new String[0];
    }
  });
  ctx = FastAnalyzer.computeExecutionContext(part, ctx, extensions);
  final int i = part.lastIndexOf(';');
  if(i != -1)
  {
    part = part.substring(i);
  }

  final List&lt;? extends ICompletionProposal&gt; proposals = (List&lt;? extends 
ICompletionProposal&gt;) new ExpressionProposalComputer().computeProposals(
      part, ctx, factory);

  for(final ICompletionProposal proposal: proposals)
  {
    acceptor.accept(proposal);
  }
}

HTH,
 Achim

Knut Wannheden wrote:

&gt; Achim,
&gt; 
&gt; Achim Demelt wrote:
&gt;&gt; Michael,
&gt;&gt; 
&gt;&gt; We're embedding Xtend expressions in our grammar to do that. The major
&gt;&gt; drawback is that the expressions themselves are not captured by grammar
&gt;&gt; rules, but are instead defined within a String literal. So to the user of
&gt;&gt; the language, it looks a bit like this:
&gt;&gt; 
&gt;&gt; define template 'ClassDescription' for ecore::EClass
&gt;&gt;  if '!this.isAbstract &amp;&amp; this.eAttributes.size() &gt; 0'
&gt;&gt;  
&gt;&gt;  heading '&quot;EClass &quot; + this.name'
&gt;&gt;  body
&gt;&gt;   ...
&gt;&gt;  end body
&gt;&gt; end template
&gt;&gt; 
&gt; 
&gt; We're also embedding the Xtend expression language in some of our DSLs by
&gt; letting the DSL extend the expression language. As a result the
&gt; expressions don't need to be parsed as simple tokens. Although we have to
&gt; make sure the grammars don't interfere.
&gt; 
&gt;&gt; But using Xtend has to nice advantages:
&gt;&gt; 
&gt;&gt; 1) We can reuse the Xtend content assist facility. So at the right
&gt;&gt; places, we just delegate from our Xtext language content assist code to
&gt;&gt; Xtend content assist. Works like a charm.
&gt;&gt; 
&gt; 
&gt; Interesting. Would you be able to share that code? Although I am not sure
&gt; it would work quite the same in our case.
&gt; 
&gt; Regards,
&gt; 
&gt; --knut


</pre>]]></content:encoded>
		<pubDate>Fri, 18 Sep 2009 08:03:51 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/msg02354.html</guid>
		<author>a.demelt@xxxxxxx (Achim Demelt)</author>
	</item>
	<item>
		<title>[news.eclipse.modeling.tmf] Re: Newbie experience with &quot;tutorial&quot;</title>
		<link>http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/msg02353.html</link>
		<description>It is there again (http://www.eclipse.org/Xtext/documentation/). It was gone, because we accidentely pointed to the 0.7.0 version of the documentation. The generation part has been added later. Sven Lorenzo Bettini schrieb: -- Need professional support for...</description>
		<content:encoded><![CDATA[<tt>It is there again (<a  href="http://www.eclipse.org/Xtext/documentation/">http://www.eclipse.org/Xtext/documentation/</a>).<br>
It was gone, because we accidentely pointed to the 0.7.0 version of the 
documentation. The generation part has been added later.</tt><br>
<br>
<pre style="margin: 0em;">Sven</pre><br>
<tt>Lorenzo Bettini schrieb:
</tt><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><tt>Also, the generation part is not in the tutorial (as it used to be for 
the previous xtext), is it?</tt><br>
<br>
<pre style="margin: 0em;">cheers
    Lorenzo</pre><br>
</blockquote><pre style="margin: 0em;"><br></pre><br>
<pre style="margin: 0em;">--
Need professional support for Eclipse Modeling?
Go visit: <a  href="http://xtext.itemis.com">http://xtext.itemis.com</a></pre><br>
]]></content:encoded>
		<pubDate>Fri, 18 Sep 2009 07:37:37 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/msg02353.html</guid>
		<author>sven.efftinge@xxxxxxx (Sven Efftinge)</author>
	</item>
	<item>
		<title>[news.eclipse.modeling.tmf] Re: Newbie experience with &quot;tutorial&quot;</title>
		<link>http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/msg02352.html</link>
		<description>Also, the generation part is not in the tutorial (as it used to be for the previous xtext), is it? cheers Lorenzo -- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino ICQ# lbetto, 16080134 (GNU/Linux User # 158233) HOME: http://www.lorenzobettini....</description>
		<content:encoded><![CDATA[<tt>Also, the generation part is not in the tutorial (as it used to be for 
the previous xtext), is it?</tt><br>
<br>
<pre style="margin: 0em;">cheers
	Lorenzo</pre><br>
<pre style="margin: 0em;">--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: <a  href="http://www.lorenzobettini.it">http://www.lorenzobettini.it</a> MUSIC: <a  href="http://www.purplesucker.com">http://www.purplesucker.com</a>
<a  href="http://www.myspace.com/supertrouperabba">http://www.myspace.com/supertrouperabba</a>
BLOGS: <a  href="http://tronprog.blogspot.com">http://tronprog.blogspot.com</a>  <a  href="http://longlivemusic.blogspot.com">http://longlivemusic.blogspot.com</a>
<a  href="http://www.gnu.org/software/src-highlite">http://www.gnu.org/software/src-highlite</a>
<a  href="http://www.gnu.org/software/gengetopt">http://www.gnu.org/software/gengetopt</a>
<a  href="http://www.gnu.org/software/gengen">http://www.gnu.org/software/gengen</a> <a  href="http://doublecpp.sourceforge.net">http://doublecpp.sourceforge.net</a></pre><br>
]]></content:encoded>
		<pubDate>Fri, 18 Sep 2009 06:59:24 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/msg02352.html</guid>
		<author>bettini@xxxxxxx (Lorenzo Bettini)</author>
	</item>
	<item>
		<title>[news.eclipse.modeling.tmf] Re: looking for a xtext C/Java like	expression language</title>
		<link>http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/msg02351.html</link>
		<description>We're also embedding the Xtend expression language in some of our DSLs by letting the DSL extend the expression language. As a result the expressions don't need to be parsed as simple tokens. Although we have to make sure the grammars don't interfere. Inte...</description>
		<content:encoded><![CDATA[<pre style="margin: 0em;">Achim,</pre><br>
<tt>Achim Demelt wrote:
</tt><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">Michael,</pre><br>
<tt>We're embedding Xtend expressions in our grammar to do that. The major 
drawback is that the expressions themselves are not captured by grammar 
rules, but are instead defined within a String literal. So to the user of 
the language, it looks a bit like this:</tt><br>
<br>
<tt>define template 'ClassDescription' for ecore::EClass<br>
 if '!this.isAbstract &amp;&amp; this.eAttributes.size() &gt; 0'<br>
 
 heading '&quot;EClass &quot; + this.name'<br>
 body<br>
  ...<br>
 end body<br>
end template</tt><br>
<br>
</blockquote><tt><br>We're also embedding the Xtend expression language in some of our DSLs by 
letting the DSL extend the expression language. As a result the expressions 
don't need to be parsed as simple tokens. Although we have to make sure the 
grammars don't interfere.</tt><br>
<br>
<blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><pre style="margin: 0em;">But using Xtend has to nice advantages:</pre><br>
<tt>1) We can reuse the Xtend content assist facility. So at the right places, 
we just delegate from our Xtext language content assist code to Xtend 
content assist. Works like a charm.</tt><br>
<br>
</blockquote><tt><br>Interesting. Would you be able to share that code? Although I am not sure it 
would work quite the same in our case.</tt><br>
<br>
<pre style="margin: 0em;">Regards,</pre><br>
<pre style="margin: 0em;">--knut</pre><br>
]]></content:encoded>
		<pubDate>Fri, 18 Sep 2009 06:58:29 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/msg02351.html</guid>
		<author>knut.wannheden@xxxxxxx (Knut Wannheden)</author>
	</item>
	<item>
		<title>[news.eclipse.modeling.tmf] Re: looking for a xtext C/Java like	expression language</title>
		<link>http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/msg02350.html</link>
		<description> </description>
		<content:encoded><![CDATA[<pre>Michael,

We're embedding Xtend expressions in our grammar to do that. The major 
drawback is that the expressions themselves are not captured by grammar 
rules, but are instead defined within a String literal. So to the user of 
the language, it looks a bit like this:

define template 'ClassDescription' for ecore::EClass
 if '!this.isAbstract &amp;&amp; this.eAttributes.size() &gt; 0'
 
 heading '&quot;EClass &quot; + this.name'
 body
  ...
 end body
end template

But using Xtend has to nice advantages:

1) We can reuse the Xtend content assist facility. So at the right places, 
we just delegate from our Xtext language content assist code to Xtend 
content assist. Works like a charm.

2) We can analyze and evaluate these expressions for free.

Maybe that's applicable in your situation, too. You may, however, have to 
write an Xtend metamodel for your language constructs if your expressions 
operate on the things defined in the language itself.

Cheers,
 Achim

Knut Wannheden wrote:

&gt; Hi Michael,
&gt; 
&gt; Here you can find a basic grammar for the Xtend expression language:
&gt; <a  href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=264188">https://bugs.eclipse.org/bugs/show_bug.cgi?id=264188</a>.
&gt; 
&gt; I don't know about any other current grammars for Java like expression
&gt; languages.
&gt; 
&gt; Regards,
&gt; 
&gt; --knut
&gt; 
&gt; Michael Scharf wrote:
&gt;&gt; Hi,
&gt;&gt; 
&gt;&gt; I am about to define a C/Java like expression language
&gt;&gt; and I wonder if there is some example to start from.
&gt;&gt; 
&gt;&gt; 
&gt;&gt; Michael


</pre>]]></content:encoded>
		<pubDate>Fri, 18 Sep 2009 06:39:03 GMT</pubDate>
		<guid isPermaLink="true">http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.modeling.tmf/msg02350.html</guid>
		<author>a.demelt@xxxxxxx (Achim Demelt)</author>
	</item>

 
	</channel>
	</rss>
<!-- MHonArc v2.6.10 -->
