Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 315537

Summary: [MWE2] CompositeComponent not supported yet in MWE2
Product: [Modeling] EMFT Reporter: Joerg Reichert <joerg83reichert>
Component: MWEAssignee: Project Inbox <emft-mwe-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: sven.efftinge
Version: unspecifiedFlags: sven.efftinge: helios+
Target Milestone: RC4   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Joerg Reichert CLA 2010-06-03 03:09:13 EDT
Build Identifier: Eclipse 3.6 I20100527-1700, MWE 2 runtime SDK 1.0.0.v201006010340	

Hello Sebastian,

I wrote you about this issue a month ago but I did not fill in a bug yet. As the fix is still not contained in the current milestone I am doing now.

I have complained that this construct in MWE has no equivalence in MWE2 yet:

<if cond="${cleanTargetDir}">
  <component class="org.eclipse.emf.mwe.utils.DirectoryCleaner"  
       directory="${targetDir}"/>
</if> 

Your answer was: The IfComponent still exists, but unfortunately it does not implement the interface expected by the new implementation yet. There is currently only a compatiblity to AbstractWorkflowComponent but not to 
CompositeComponent. When realized the syntax would be

if = {
   cond = "${..}"
   component = DirectoryCleaner {
   }
} 

Reproducible: Always
Comment 1 Sven Efftinge CLA 2010-06-03 05:28:50 EDT
This has been fixed since RC1. 
org.eclipse.emf.mwe.core.container.CompositeComponent implements org.eclipse.emf.mwe2.runtime.workflow.IWorkflowComponent

Do you have any trouble using the if component?
Comment 2 Joerg Reichert CLA 2010-06-03 07:39:12 EDT
(In reply to comment #1)
> This has been fixed since RC1. 
> org.eclipse.emf.mwe.core.container.CompositeComponent implements
> org.eclipse.emf.mwe2.runtime.workflow.IWorkflowComponent
> 
> Do you have any trouble using the if component?

My mistake, I used the wrong syntax, the right syntax is:

component = org.eclipse.emf.mwe.core.container.IfComponent {
  cond = "${cleanTargetDir}"
  component = DirectoryCleaner{
     directory = targetDir
  }
}