Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[eclipse][m2e] Replace SARLEclipseConstants.MINIMAL_JRE_VERSION.
The replacement is SARLVersion.MINIMAL_JDK_VERSION.

close #648

Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Apr 22, 2017
1 parent b1c406d commit 56f87c7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
Expand Up @@ -71,10 +71,6 @@ public final class SARLEclipseConfig {
*/
public static final int ERR_UNSPECIFIED_AGENT_NAME = 501;

/** Minimal version of the JRE supported by the SARL launch application.
*/
public static final String MINIMAL_JRE_VERSION = "1.8"; //$NON-NLS-1$

/** Filename of the image that may be used at
* the top of the wizard dialog when creating new SARL project.
*/
Expand Down
Expand Up @@ -58,6 +58,7 @@
import io.sarl.eclipse.runtime.ProjectSREProviderFactory;
import io.sarl.eclipse.runtime.SARLRuntime;
import io.sarl.eclipse.runtime.SREConfigurationBlock;
import io.sarl.lang.SARLVersion;

/**
* Configuration tab for the JRE and the SARL runtime environment.
Expand Down Expand Up @@ -253,13 +254,13 @@ protected boolean isValidJREVersion(ILaunchConfiguration config) {
return false;
}
final Version jreVersion = Version.parseVersion(version);
final Version minVersion = Version.parseVersion(SARLEclipseConfig.MINIMAL_JRE_VERSION);
final Version minVersion = Version.parseVersion(SARLVersion.MINIMAL_JDK_VERSION);
if (jreVersion.compareTo(minVersion) < 0) {
setErrorMessage(MessageFormat.format(
Messages.RuntimeEnvironmentTab_4,
install.getName(),
version,
SARLEclipseConfig.MINIMAL_JRE_VERSION));
SARLVersion.MINIMAL_JDK_VERSION));
return false;
}
}
Expand Down
Expand Up @@ -71,6 +71,7 @@
import io.sarl.eclipse.buildpath.SARLClasspathContainerInitializer;
import io.sarl.eclipse.util.Utilities;
import io.sarl.lang.SARLConfig;
import io.sarl.lang.SARLVersion;
import io.sarl.lang.ui.preferences.SARLPreferences;

/** Project configuration for the M2E.
Expand Down Expand Up @@ -376,9 +377,9 @@ private static void setVersion(Properties props, String propName, String value,
private static void forceMavenCompilerConfiguration(IMavenProjectFacade facade, SARLConfiguration config) {
final Properties props = facade.getMavenProject().getProperties();
setVersion(props, "maven.compiler.source", config.getInputCompliance(), //$NON-NLS-1$
SARLEclipseConfig.MINIMAL_JRE_VERSION);
SARLVersion.MINIMAL_JDK_VERSION);
setVersion(props, "maven.compiler.target", config.getOutputCompliance(), //$NON-NLS-1$
SARLEclipseConfig.MINIMAL_JRE_VERSION);
SARLVersion.MINIMAL_JDK_VERSION);
final String encoding = config.getEncoding();
if (encoding != null && !encoding.isEmpty()) {
props.setProperty("maven.compiler.encoding", encoding); //$NON-NLS-1$
Expand Down

0 comments on commit 56f87c7

Please sign in to comment.