Author: koen.aers(a)jboss.com
Date: 2011-07-04 06:12:01 -0400 (Mon, 04 Jul 2011)
New Revision: 32546
Modified:
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeEmbeddedRuntime.java
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeExternalRuntime.java
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeRuntime.java
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeEmbeddedRuntimeTest.java
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeExternalRuntimeTest.java
Log:
add getType() method to ForgeRuntime
Modified:
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeEmbeddedRuntime.java
===================================================================
---
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeEmbeddedRuntime.java 2011-07-04
07:16:04 UTC (rev 32545)
+++
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeEmbeddedRuntime.java 2011-07-04
10:12:01 UTC (rev 32546)
@@ -27,5 +27,10 @@
}
return result;
}
+
+ @Override
+ public String getType() {
+ return "embedded";
+ }
}
Modified:
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeExternalRuntime.java
===================================================================
---
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeExternalRuntime.java 2011-07-04
07:16:04 UTC (rev 32545)
+++
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeExternalRuntime.java 2011-07-04
10:12:01 UTC (rev 32546)
@@ -18,5 +18,10 @@
public String getLocation() {
return location;
}
+
+ @Override
+ public String getType() {
+ return "external";
+ }
}
Modified:
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeRuntime.java
===================================================================
---
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeRuntime.java 2011-07-04
07:16:04 UTC (rev 32545)
+++
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeRuntime.java 2011-07-04
10:12:01 UTC (rev 32546)
@@ -4,5 +4,6 @@
String getName();
String getLocation();
+ String getType();
}
Modified:
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeEmbeddedRuntimeTest.java
===================================================================
---
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeEmbeddedRuntimeTest.java 2011-07-04
07:16:04 UTC (rev 32545)
+++
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeEmbeddedRuntimeTest.java 2011-07-04
10:12:01 UTC (rev 32546)
@@ -11,26 +11,24 @@
public class ForgeEmbeddedRuntimeTest {
- private String name = null;
private String location = null;
@Before
public void setUp() throws Exception {
- name = "embedded";
location =
FileLocator.getBundleFile(Platform.getBundle("org.jboss.tools.forge.runtime")).getAbsolutePath();
}
@After
public void tearDown() {
- name = null;
location = null;
}
@Test
public void testForgeEmbeddedRuntime() {
assertNotNull(ForgeEmbeddedRuntime.INSTANCE);
- assertEquals(name, ForgeEmbeddedRuntime.INSTANCE.getName());
+ assertEquals("embedded", ForgeEmbeddedRuntime.INSTANCE.getName());
assertEquals(location, ForgeEmbeddedRuntime.INSTANCE.getLocation());
+ assertEquals("embedded", ForgeEmbeddedRuntime.INSTANCE.getType());
}
}
Modified:
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeExternalRuntimeTest.java
===================================================================
---
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeExternalRuntimeTest.java 2011-07-04
07:16:04 UTC (rev 32545)
+++
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeExternalRuntimeTest.java 2011-07-04
10:12:01 UTC (rev 32546)
@@ -11,6 +11,7 @@
ForgeExternalRuntime runtime = new ForgeExternalRuntime("foo",
"bar");
assertEquals("foo", runtime.getName());
assertEquals("bar", runtime.getLocation());
+ assertEquals("external", runtime.getType());
}
}