Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » EGL editor warning
EGL editor warning [message #1704200] Sat, 08 August 2015 16:46 Go to next message
Arseniy Isakov is currently offline Arseniy IsakovFriend
Messages: 118
Registered: May 2012
Senior Member
Hello
Recently I migrated to Epsilon 1.2. And egl editor shows me following message
"All loose statements and textual content after the first operation will be ignored at runtime."
Can you give me any suggestion how to avoid this warning.
Thanks
Arseniy Isaov


My template is :

[%@template
operation domain::OutputText treeContext(hash,value) { 
%]
<p:inplace editor="true" event="dblclick">
   [%=self.rw(hash,value)%]
</p:inplace>      
[%
}
%]

[%@template
operation domain::OutputText tableContext(hash,value) { 
%]
<p:cellEditor>
  <f:facet name="output">
     <span style="display: inline-block; width: 100%; height: 100%">
      [%=self.ro(hash,value)%]
     </span>
  </f:facet>
  <f:facet name="input">
     [%=self.rw(hash,value)%]
  </f:facet>
</p:cellEditor>  
[%   
}
%]

[%@template
operation domain::OutputText noContext(hash,value) { 
%]
   [%=self.rw(hash,value)%]
[%   
}
%]


[%@template
operation domain::OutputText rw(hash,value) { 
     hash.put("readonly","true");
%]
<p:inputText   [%=self.mkUIDBinding()%] value="[%=value%]"   [%=self.uiElementAttributes(hash)%]>
   [%=self.validator(hash)%]
   [%=self.convertor(hash)%]
</p:inputText>
[%
     hash.put("readonly",null);
}
%]

[%@template
operation domain::OutputText ro(hash,value) { 
%]
<h:outputText value="[%=value%]" [%=self.uiElementAttributes(hash)%] >
   [%=self.readOnlyConverter(hash)%]
</h:outputText>
[%
}
%]
Re: EGL editor warning [message #1704228 is a reply to message #1704200] Sun, 09 August 2015 10:17 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

This warning tries to prevent users from running into the common issue in which "X" wouldn't be printed. This is because we only run the code blocks up to the first operation (for historic reasons, I believe):

operation f() {
  ...
}

'X'.println();


In your case, perhaps removing the unnecessary [% %] between @template operation would help:

[%@template
operation domain::OutputText treeContext(hash,value) { 
%]
<p:inplace editor="true" event="dblclick">
   [%=self.rw(hash,value)%]
</p:inplace>      
[%
}

@template
operation domain::OutputText tableContext(hash,value) { 
%]
<p:cellEditor>
  <f:facet name="output">
     <span style="display: inline-block; width: 100%; height: 100%">
      [%=self.ro(hash,value)%]
     </span>
  </f:facet>
  <f:facet name="input">
     [%=self.rw(hash,value)%]
  </f:facet>
</p:cellEditor>  
[%   
}

@template
operation domain::OutputText noContext(hash,value) { 
%]
   [%=self.rw(hash,value)%]
[%   
}

@template
operation domain::OutputText rw(hash,value) { 
     hash.put("readonly","true");
%]
<p:inputText   [%=self.mkUIDBinding()%] value="[%=value%]"   [%=self.uiElementAttributes(hash)%]>
   [%=self.validator(hash)%]
   [%=self.convertor(hash)%]
</p:inputText>
[%
     hash.put("readonly",null);
}

@template
operation domain::OutputText ro(hash,value) { 
%]
<h:outputText value="[%=value%]" [%=self.uiElementAttributes(hash)%] >
   [%=self.readOnlyConverter(hash)%]
</h:outputText>
[%
}
%]
Re: EGL editor warning [message #1704239 is a reply to message #1704228] Sun, 09 August 2015 18:06 Go to previous messageGo to next message
Arseniy Isakov is currently offline Arseniy IsakovFriend
Messages: 118
Registered: May 2012
Senior Member
I have another template which gives me same issue:

[% @template
operation  entity_builder(hash) {
    
         maven_entity_builder(hash);
 
}

@template
operation  service_builder(hash) {
    
         maven_service_builder(hash);
 
}

@template
operation  proxy_client_builder(hash) {
    
         maven_proxy_client_builder(hash);
 
}

@template
operation  mvc_application_builder(hash) {
    
         maven_mvc_application_builder(hash);
 
}

 @template
operation  entity_build_runner(hash) {
    
         maven_entity_build_runner(hash);
 
}

 @template
operation  service_build_runner(hash) {
    
         maven_service_build_runner(hash);
 
}

 @template
operation  mvc_build_runner(hash) {
    
         maven_mvc_build_runner(hash);
 
}

 @template
operation  proxy_client_build_runner(hash) {
    
         maven_proxy_client_build_runner(hash);
 
}
%]



I do no have unnecessary [% %] here
Re: EGL editor warning [message #1704241 is a reply to message #1704239] Sun, 09 August 2015 18:29 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

If I recall correctly, EGL source code is transformed into EOL, so the last bit after the closing %] might be producing an out.writeln() call that is creating that problem. Do you have anything after the closing %] at all (e.g. a newline character or any kind of whitespace)?
Re: EGL editor warning [message #1704263 is a reply to message #1704241] Mon, 10 August 2015 00:06 Go to previous message
Arseniy Isakov is currently offline Arseniy IsakovFriend
Messages: 118
Registered: May 2012
Senior Member
Yes I have whitespace and newline. Honestly speaking it is very painfull to fix all of this stuff. It is looks like a bug in EGL editor.
Previous Topic:Some Questions about epsilon and EVL
Next Topic:Non-EMF model as source for model-to-model transformation?
Goto Forum:
  


Current Time: Fri Apr 19 23:56:23 GMT 2024

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

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

Back to the top