Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320472 - emf.Ecore2Java: Code Generation of Project is not working correctly
Summary: emf.Ecore2Java: Code Generation of Project is not working correctly
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 324538
  Show dependency tree
 
Reported: 2010-07-21 04:54 EDT by Gerd CLA
Modified: 2010-11-05 05:41 EDT (History)
1 user (show)

See Also:


Attachments
Patch to correct the behaviour of the emf.Ecore2Java ant task (1.36 KB, patch)
2010-07-21 05:00 EDT, Gerd CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gerd CLA 2010-07-21 04:54:50 EDT
Build Identifier: 20100617-1415

The specification of generateEditorProject="true" for the emf.Ecore2Java task has no effect (no code is generate) unless you also specify generateTestsProject="true". Value of property generateTestsProject has no effect on the generation of Tests project. Tests project is always created if command line argument -testsProject is specified.

Reproducible: Always

Steps to Reproduce:
1. Generate Ant File
<project name="project" default="test1" basedir=".">
	<target name="test1">
		<emf.Ecore2Java
			model="model.ecore"
			genModel="model.genmodel"
			generateModelProject="true"
			generateEditProject="true"
			generateEditorProject="true"
			generateJavaCode="true"
			autoBuild="true"
			jdklevel="6.0">
			<arg line="-modelProject project src-gen"/>
			<arg line="-editProject project.edit src"/>
			<arg line="-editorProject project.editor src"/>
			<arg line="-validateModel true"/>
			<arg line="-package nsURI"/>
		</emf.Ecore2Java>
	</target>

	<target name="test2">
		<emf.Ecore2Java
			model="model.ecore"
			genModel="model.genmodel"
			generateModelProject="true"
			generateEditProject="true"
			generateEditorProject="true"
			generateTestsProject="false"
			generateJavaCode="true"
			autoBuild="true"
			jdklevel="6.0">
			<arg line="-modelProject project src-gen"/>
			<arg line="-editProject project.edit src"/>
			<arg line="-editorProject project.editor src"/>
			<arg line="-testsProject project.tests src"/>
			<arg line="-validateModel true"/>
			<arg line="-package nsURI"/>
		</emf.Ecore2Java>
	</target>
</project>
2. Execute test1 task. Resulting in no code generation for Editor project.
3. Execute test2 task. Resulting in code generation of Editor and Tests project.
Comment 1 Gerd CLA 2010-07-21 05:00:45 EDT
Created attachment 174822 [details]
Patch to correct the behaviour of the emf.Ecore2Java ant task
Comment 2 Ed Merks CLA 2010-09-05 12:32:32 EDT
The fix is committed to CVS for 2.6.
Comment 3 Ed Merks CLA 2010-11-05 05:41:28 EDT
The fix is available in the latest build for the stream.