Skip to content

Commit

Permalink
[eclipse] Rename StandardSREInstall to ManifestBasedSREInstall.
Browse files Browse the repository at this point in the history
see #936

Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Oct 27, 2019
1 parent 3a68a56 commit e8b297a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
Expand Up @@ -61,15 +61,15 @@
import io.sarl.eclipse.util.Utilities;

/**
* Standard SRE install.
* SRE install that is based on the information within the MANIFEST file.
*
* <p>The standard SRE install assumes:
* <ul>
* <li>The SRE is based on a single JAR file.</li>
* <li>The main class of the SRE is defined in the Manifest field <code>"Main-Class"</code>.</li>
* <li>The Manifest contains a section named <code>"SARL-Runtime-Environment"</code>. This section contains the following entries:
* <ul>
* <li>The version number of the SARL sepcifications that are supported by the SRE is defined in the Manifest field <code>"SARL-Spec-Version"</code>.
* <li>The version number of the SARL specifications that are supported by the SRE is defined in the Manifest field <code>"SARL-Spec-Version"</code>.
* </li>
* <li>The name of the SRE may be given by the field <code>"Name"</code>.</li>
* <li>The VM arguments of the SRE may be given by the field <code>"VM-Arguments"</code>.</li>
Expand All @@ -90,7 +90,7 @@
* @mavengroupid $GroupId$
* @mavenartifactid $ArtifactId$
*/
public class StandardSREInstall extends AbstractSREInstall {
public class ManifestBasedSREInstall extends AbstractSREInstall {

private IPath jarFile;

Expand Down Expand Up @@ -129,7 +129,7 @@ public class StandardSREInstall extends AbstractSREInstall {
*
* @param id the identifier of this SRE installation.
*/
public StandardSREInstall(String id) {
public ManifestBasedSREInstall(String id) {
super(id);
}

Expand All @@ -139,15 +139,15 @@ public IPath getPreferredClassPathContainerPath() {
}

@Override
public StandardSREInstall clone() {
final StandardSREInstall clone = (StandardSREInstall) super.clone();
public ManifestBasedSREInstall clone() {
final ManifestBasedSREInstall clone = (ManifestBasedSREInstall) super.clone();
clone.jarFile = this.jarFile == null ? null : Path.fromPortableString(clone.jarFile.toPortableString());
return clone;
}

@Override
public StandardSREInstall copy(String id) {
return (StandardSREInstall) super.copy(id);
public ManifestBasedSREInstall copy(String id) {
return (ManifestBasedSREInstall) super.copy(id);
}

/**
Expand Down
Expand Up @@ -35,8 +35,8 @@
import io.sarl.eclipse.SARLEclipseConfig;
import io.sarl.eclipse.SARLEclipsePlugin;
import io.sarl.eclipse.runtime.ISREInstall;
import io.sarl.eclipse.runtime.ManifestBasedSREInstall;
import io.sarl.eclipse.runtime.SREException;
import io.sarl.eclipse.runtime.StandardSREInstall;

/**
* Wiazrd for SRE installation.
Expand Down Expand Up @@ -128,7 +128,7 @@ && isInstance(info.getAttribute("sreInstallType"), sre)) { //$NON-NLS-1$
}
}

if (sre == null || sre instanceof StandardSREInstall) {
if (sre == null || sre instanceof ManifestBasedSREInstall) {
final StandardSREPage standardVMPage = new StandardSREPage();
standardVMPage.setExistingNames(this.names);
return standardVMPage;
Expand Down
Expand Up @@ -46,9 +46,9 @@
import org.eclipse.swt.widgets.Text;

import io.sarl.eclipse.runtime.ISREInstall;
import io.sarl.eclipse.runtime.ManifestBasedSREInstall;
import io.sarl.eclipse.runtime.SARLRuntime;
import io.sarl.eclipse.runtime.SREException;
import io.sarl.eclipse.runtime.StandardSREInstall;
import io.sarl.eclipse.util.Utilities;

/**
Expand All @@ -69,9 +69,9 @@ public class StandardSREPage extends AbstractSREInstallPage {

private Text sreIdTextField;

private StandardSREInstall originalSRE;
private ManifestBasedSREInstall originalSRE;

private StandardSREInstall workingCopy;
private ManifestBasedSREInstall workingCopy;

/** Construct a configuration page for the SREs.
*/
Expand Down Expand Up @@ -200,11 +200,11 @@ public boolean performFinish() {

@Override
public void initialize(ISREInstall sre) {
if (!(sre instanceof StandardSREInstall)) {
if (!(sre instanceof ManifestBasedSREInstall)) {
throw new SREException("Illegal SRE type: expecting StandardSREInstall."); //$NON-NLS-1$
}
setTitle(MessageFormat.format(Messages.StandardSREPage_7, sre.getName()));
this.originalSRE = (StandardSREInstall) sre;
this.originalSRE = (ManifestBasedSREInstall) sre;
createWorkingCopy();
}

Expand All @@ -217,7 +217,7 @@ protected void createWorkingCopy() {

@Override
public ISREInstall createSelection(String id) {
final StandardSREInstall sre = new StandardSREInstall(id);
final ManifestBasedSREInstall sre = new ManifestBasedSREInstall(id);
sre.revalidate();
initialize(sre);
return sre;
Expand Down

0 comments on commit e8b297a

Please sign in to comment.