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

Bug 444578

Summary: Fix Manifest file generated by new Viewpoint Specification Project wizard
Product: [Modeling] Sirius Reporter: Jessy Mallet <jessy.mallet>
Component: DiagramAssignee: Laurent Redor <laurent.redor>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P1 CC: laurent.redor, pierre-charles.david
Version: 1.0.0Keywords: triaged
Target Milestone: 3.0.0M5   
Hardware: All   
OS: All   
Whiteboard:

Description Jessy Mallet CLA 2014-09-19 05:27:29 EDT
Using the 'Viewpoint specification project' wizard the generated project, the specified execution environment in Manifest content is always "J2SE-1.6", it should use the default one.
Comment 1 Jessy Mallet CLA 2014-09-30 08:41:17 EDT
See the proposed solution :
https://git.eclipse.org/r/#/c/34121/
Comment 2 Laurent Redor CLA 2014-11-13 05:51:39 EST
Fix proposed by Jessy [1] has been pushed [2].

[1] comment 1
[2] http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=b8054650f683fe0972ac5418ccf4954fe83b1b13
Comment 3 Laurent Redor CLA 2014-11-13 05:52:13 EST
Warning: 'backport' has been added in whiteboard list but it will not be a simple cherry-pick. The method org.eclipse.sirius.ui.tools.api.project.ViewpointSpecificationProject.getDefaultJseId() must be duplicated in ViewpointSpecificationProjectCreationTest to avoid a new API in maintenance version.
Comment 4 Pierre-Charles David CLA 2014-11-24 10:37:48 EST
Removed the "backport" label.

Actually, I'm not even sure we should have "fixed" this. A newly created Viewpoint Specification Project only depends on Eclipse and Sirius, both of which require at least J2SE-1.6. The BREE represents the minimum required version, and according to https://wiki.eclipse.org/Execution_Environments#Which_Execution_Environment_should_I_use.3F one "should seek to use the smallest EE possible."

Sirius requires Java 1.6, and what the some specific user has configured as a default at some specific time in one specific workspace does not change that. *If* the user makes use of features specific to Java 1.7 or later, *then* and only then the bundle's BREE must be changed, but that is is responsibility.

Actually, thinking about this I am reopening this, and I believe the changes should be reverted and the issue re-closed as INVALID. With the change, if the user has for some reason Java 1.5 as the default, we will create a VSP with 1.5 as its BREE, which is wrong: Sirius requires 1.6 or later. Conversely, if the user has been using Java 8, creating a new VSP will set 1.8 for the BREE, which would make the plug-in not even installable for the majority of users which are using re-1.8 versions of Java, even if the plug-in is just a plain VSM which would work perfectly fine with Java 1.6.
Comment 5 Jessy Mallet CLA 2014-12-10 10:29:26 EST
See the revert proposed : 
https://git.eclipse.org/r/#/c/37964/
Comment 7 Pierre-Charles David CLA 2015-01-21 05:10:46 EST
See comment 4 for why this would be a bad idea.