Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314986 - Conditions and loops in e4xmi
Summary: Conditions and loops in e4xmi
Status: CLOSED WONTFIX
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 4.1   Edit
Assignee: Project Inbox CLA
QA Contact: Boris Bokowski CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-29 15:27 EDT by Kirill Zotkin CLA
Modified: 2011-08-15 14:26 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kirill Zotkin CLA 2010-05-29 15:27:17 EDT
Build Identifier: I20100406-1034

Lack of conditions, switches & loops are a main drawback of declarative xml before  imperative java while defining ui. I suggest to add them to e4xmi format or make it "templatable" to include java code.

Reproducible: Sometimes
Comment 1 Kirill Zotkin CLA 2010-05-30 08:33:21 EDT
Excuse me, i forgot that e4xmi defines ui of entire app.
This could be applied to the separate views if they wasn't defined in java.
Comment 2 Paul Webster CLA 2010-05-31 08:19:35 EDT
e4xmi is the XML representation of EMF.  If we need conditionals in it we would probably allow ECMAScript to be used.

XWT is a declarative GUI XML language.  I'm not sure if it has conditionals and loops.

PW
Comment 3 Yves YANG CLA 2010-05-31 08:35:48 EDT
(In reply to comment #2)
> XWT is a declarative GUI XML language.  I'm not sure if it has conditionals and
> loops.
> 
XWT supports a concept of triggers. The condition expression is used. 

There are several types of triggers:
  1. Control trigger
  2. Multiple Control trigger
  3. Data Trigger
  4. Multiple Data Trigger
  5. Event Trigger

Here is my blog:
http://dev.eclipse.org/blogs/yvesyang/2009/10/12/xwt-ui-trigger-1/

You can find more detail information about this concept. 

yves
Comment 4 Thomas Schindl CLA 2010-05-31 08:38:38 EDT
You don't have to build an application using e4xmi-Files in the latest e4 builds you have 2 possibilities to make up the application in a progammatic way:

a) Using Processors
   * Create a minimal e4xmi (it only has the Application-Element)
   * Create a contribution.e4xmi and install a Processor on the element
   => Create your UI model in Java

b) Replace the default ModelResource Handling
   (available since last week)
   => You can redefine the model resource creation by creating your own 
      implementation of IModelResourceHandler and redefine the resource-loading 
      instance in your product-extension point like this:
---------8<---------
         <property
               name="modelResourceHandler"
               value="platform:/plugin/my.plug.in/MyModelResource">
         </property>
---------8<---------
Comment 5 Thomas Schindl CLA 2010-05-31 08:41:24 EDT
I think those 2 possibities make this request obsolete or are we now discussing XWT then I think we should move this bug to XWT.
Comment 6 Thomas Schindl CLA 2011-08-15 14:26:22 EDT
as my last comment suggest this is nothing we are going to implement in e4xmi. To define the inner part of a view you'd use XWT and if they don't support this please reopen this bug and move it to XWT