summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLazar Kirchev2011-10-12 10:46:21 (EDT)
committerLazar Kirchev2011-10-12 10:46:21 (EDT)
commit5c784efdd39e5a31874d647bc59f8cc781af0b64 (patch)
tree57b629945aad2f962aab98de0ffe9cb3ffba7068
parent0a9412fb9b79504adcfea4ce990cef03b2d958a7 (diff)
downloadrt.equinox.incubator-5c784efdd39e5a31874d647bc59f8cc781af0b64.zip
rt.equinox.incubator-5c784efdd39e5a31874d647bc59f8cc781af0b64.tar.gz
rt.equinox.incubator-5c784efdd39e5a31874d647bc59f8cc781af0b64.tar.bz2
Set default scope to equinox:*
-rw-r--r--console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/ssh/SshShellTests.java2
-rw-r--r--console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetCommandTests.java2
-rw-r--r--console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetCommandWithConfigAdminTests.java2
-rw-r--r--console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetConnectionTests.java2
-rw-r--r--console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetDisconnectionTest.java2
-rw-r--r--console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetServerTests.java2
-rw-r--r--console/org.eclipse.equinox.console.supportability/build.properties3
-rw-r--r--console/org.eclipse.equinox.console.supportability/src/org/eclipse/equinox/console/command/adapter/Activator.java1
-rw-r--r--console/org.eclipse.equinox.console.supportability/src/org/eclipse/equinox/console/ssh/SshShell.java3
-rw-r--r--console/org.eclipse.equinox.console.supportability/src/org/eclipse/equinox/console/telnet/TelnetConnection.java7
10 files changed, 15 insertions, 11 deletions
diff --git a/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/ssh/SshShellTests.java b/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/ssh/SshShellTests.java
index 79a96c9..69a8642 100644
--- a/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/ssh/SshShellTests.java
+++ b/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/ssh/SshShellTests.java
@@ -72,7 +72,7 @@ public class SshShellTests {
CommandSession session = EasyMock.createMock(CommandSession.class);
EasyMock.makeThreadSafe(session, true);
session.put((String)EasyMock.anyObject(), EasyMock.anyObject());
- EasyMock.expectLastCall().times(4);
+ EasyMock.expectLastCall().times(5);
EasyMock.expect(session.execute(GOGO_SHELL_COMMAND)).andReturn(null);
session.close();
EasyMock.expectLastCall();
diff --git a/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetCommandTests.java b/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetCommandTests.java
index 28dff0e..b32a55b 100644
--- a/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetCommandTests.java
+++ b/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetCommandTests.java
@@ -39,7 +39,7 @@ public class TelnetCommandTests {
public void testTelnetCommand() throws Exception {
CommandSession session = EasyMock.createMock(CommandSession.class);
session.put((String)EasyMock.anyObject(), EasyMock.anyObject());
- EasyMock.expectLastCall().times(4);
+ EasyMock.expectLastCall().times(3);
EasyMock.expect(session.execute((String)EasyMock.anyObject())).andReturn(new Object());
session.close();
EasyMock.expectLastCall();
diff --git a/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetCommandWithConfigAdminTests.java b/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetCommandWithConfigAdminTests.java
index 51ea419..2eb2072 100644
--- a/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetCommandWithConfigAdminTests.java
+++ b/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetCommandWithConfigAdminTests.java
@@ -48,7 +48,7 @@ public class TelnetCommandWithConfigAdminTests {
public void testTelnetCommandWithConfigAdminEnabledTelnet() throws Exception {
CommandSession session = EasyMock.createMock(CommandSession.class);
session.put((String)EasyMock.anyObject(), EasyMock.anyObject());
- EasyMock.expectLastCall().times(4);
+ EasyMock.expectLastCall().times(3);
EasyMock.expect(session.execute((String)EasyMock.anyObject())).andReturn(new Object());
session.close();
EasyMock.expectLastCall();
diff --git a/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetConnectionTests.java b/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetConnectionTests.java
index cbbea13..c133ead 100644
--- a/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetConnectionTests.java
+++ b/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetConnectionTests.java
@@ -46,7 +46,7 @@ public class TelnetConnectionTests {
CommandSession session = EasyMock.createMock(CommandSession.class);
session.put((String)EasyMock.anyObject(), EasyMock.anyObject());
- EasyMock.expectLastCall().times(4);
+ EasyMock.expectLastCall().times(3);
EasyMock.expect(session.execute((String)EasyMock.anyObject())).andReturn(null);
session.close();
EasyMock.expectLastCall();
diff --git a/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetDisconnectionTest.java b/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetDisconnectionTest.java
index 7f7fb2e..810d1f5 100644
--- a/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetDisconnectionTest.java
+++ b/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetDisconnectionTest.java
@@ -41,7 +41,7 @@ public class TelnetDisconnectionTest {
final CommandSession session = EasyMock.createMock(CommandSession.class);
EasyMock.makeThreadSafe(session, true);
session.put((String)EasyMock.anyObject(), EasyMock.anyObject());
- EasyMock.expectLastCall().times(4);
+ EasyMock.expectLastCall().times(3);
EasyMock.expect(session.get("CLOSEABLE")).andReturn(connection);
EasyMock.expect(session.execute((String)EasyMock.anyObject())).andReturn(null);
session.close();
diff --git a/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetServerTests.java b/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetServerTests.java
index 32f95fa..319912e 100644
--- a/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetServerTests.java
+++ b/console/org.eclipse.equinox.console.supportability.tests/src/org/eclipse/equinox/console/telnet/TelnetServerTests.java
@@ -37,7 +37,7 @@ public class TelnetServerTests {
CommandSession session = EasyMock.createMock(CommandSession.class);
session.put((String)EasyMock.anyObject(), EasyMock.anyObject());
- EasyMock.expectLastCall().times(4);
+ EasyMock.expectLastCall().times(3);
EasyMock.expect(session.execute((String)EasyMock.anyObject())).andReturn(new Object());
session.close();
EasyMock.expectLastCall();
diff --git a/console/org.eclipse.equinox.console.supportability/build.properties b/console/org.eclipse.equinox.console.supportability/build.properties
index fa62da5..929ee16 100644
--- a/console/org.eclipse.equinox.console.supportability/build.properties
+++ b/console/org.eclipse.equinox.console.supportability/build.properties
@@ -1,4 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- about.html
+ about.html,\
+ .
diff --git a/console/org.eclipse.equinox.console.supportability/src/org/eclipse/equinox/console/command/adapter/Activator.java b/console/org.eclipse.equinox.console.supportability/src/org/eclipse/equinox/console/command/adapter/Activator.java
index c7dcca8..56aac3b 100644
--- a/console/org.eclipse.equinox.console.supportability/src/org/eclipse/equinox/console/command/adapter/Activator.java
+++ b/console/org.eclipse.equinox.console.supportability/src/org/eclipse/equinox/console/command/adapter/Activator.java
@@ -125,6 +125,7 @@ public class Activator implements BundleActivator {
new Thread(new Runnable(){
public void run() {
try {
+ gogoSession.put("SCOPE", "equinox:*");
gogoSession.put("prompt", "osgi> ");
gogoSession.execute("gosh --login --noshutdown");
}
diff --git a/console/org.eclipse.equinox.console.supportability/src/org/eclipse/equinox/console/ssh/SshShell.java b/console/org.eclipse.equinox.console.supportability/src/org/eclipse/equinox/console/ssh/SshShell.java
index b95c260..99992a1 100644
--- a/console/org.eclipse.equinox.console.supportability/src/org/eclipse/equinox/console/ssh/SshShell.java
+++ b/console/org.eclipse.equinox.console.supportability/src/org/eclipse/equinox/console/ssh/SshShell.java
@@ -59,6 +59,8 @@ public class SshShell implements Command, Closeable {
private Map<String, KEYS> currentEscapesToKey;
private static final String PROMPT = "prompt";
private static final String OSGI_PROMPT = "osgi> ";
+ private static final String SCOPE = "SCOPE";
+ private static final String EQUINOX_SCOPE = "equinox:*";
private static final String INPUT_SCANNER = "INPUT_SCANNER";
private static final String SSH_INPUT_SCANNER = "SSH_INPUT_SCANNER";
private static final String USER_STORAGE_PROPERTY_NAME = "osgi.console.ssh.useDefaultSecureStorage";
@@ -130,6 +132,7 @@ public class SshShell implements Command, Closeable {
final PrintStream output = new PrintStream(outp);
session = processor.createSession(inp, output, output);
+ session.put(SCOPE, EQUINOX_SCOPE);
session.put(PROMPT, OSGI_PROMPT);
session.put(INPUT_SCANNER, consoleInputHandler.getScanner());
session.put(SSH_INPUT_SCANNER, inputHandler.getScanner());
diff --git a/console/org.eclipse.equinox.console.supportability/src/org/eclipse/equinox/console/telnet/TelnetConnection.java b/console/org.eclipse.equinox.console.supportability/src/org/eclipse/equinox/console/telnet/TelnetConnection.java
index 4b524a4..56802cf 100644
--- a/console/org.eclipse.equinox.console.supportability/src/org/eclipse/equinox/console/telnet/TelnetConnection.java
+++ b/console/org.eclipse.equinox.console.supportability/src/org/eclipse/equinox/console/telnet/TelnetConnection.java
@@ -38,8 +38,8 @@ public class TelnetConnection extends Thread implements Closeable {
private static final long NEGOTIATION_TIMEOUT = 60000;
private static final String PROMPT = "prompt";
private static final String OSGI_PROMPT = "osgi> ";
- private static final String INPUT_SCANNER = "INPUT_SCANNER";
- private static final String SSH_INPUT_SCANNER = "SSH_INPUT_SCANNER";
+ private static final String SCOPE = "SCOPE";
+ private static final String EQUINOX_SCOPE = "equinox:*";
private static final String CLOSEABLE = "CLOSEABLE";
public TelnetConnection (Socket socket, CommandProcessor processor, BundleContext context) {
@@ -83,9 +83,8 @@ public class TelnetConnection extends Thread implements Closeable {
consoleInputHandler.start();
session = processor.createSession(inp, output, output);
+ session.put(SCOPE, EQUINOX_SCOPE);
session.put(PROMPT, OSGI_PROMPT);
- session.put(INPUT_SCANNER, consoleInputHandler.getScanner());
- session.put(SSH_INPUT_SCANNER, telnetInputHandler.getScanner());
// Store this closeable object in the session, so that the disconnect command can close it
session.put(CLOSEABLE, this);
((ConsoleInputScanner)consoleInputHandler.getScanner()).setSession(session);