summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbkolb2007-09-26 09:35:47 (EDT)
committer bkolb2007-09-26 09:35:47 (EDT)
commit604201bc8e285e5112db7de3fdb475805ffe4dfd (patch)
treeccfae44c083e92886317a4b62b658f821f7200ff
parentad0186e726badf962dee7010de4dc6edb9f03871 (diff)
downloadorg.eclipse.mwe-604201bc8e285e5112db7de3fdb475805ffe4dfd.zip
org.eclipse.mwe-604201bc8e285e5112db7de3fdb475805ffe4dfd.tar.gz
org.eclipse.mwe-604201bc8e285e5112db7de3fdb475805ffe4dfd.tar.bz2
refactoring
-rw-r--r--plugins/org.eclipse.emf.mwe.core/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/Connection.java54
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/PackageReceiver.java (renamed from plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/PacketReceiver.java)66
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/PackageSender.java (renamed from plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/PacketSender.java)52
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/AbstractPackage.java (renamed from plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/AbstractPacket.java)6
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/BreakpointPackage.java (renamed from plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/BreakpointPacket.java)6
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/CommandPackage.java (renamed from plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/CommandPacket.java)6
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/ConfirmationPackage.java (renamed from plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/ConfirmationPacket.java)6
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/EventPackage.java (renamed from plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/EventPacket.java)6
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/EventPackageWithFrames.java (renamed from plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/EventPacketWithFrames.java)6
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/HandshakePackage.java (renamed from plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/HandshakePacket.java)4
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/RegisterPackage.java (renamed from plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/RegisterPacket.java)4
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/RequireVarPackage.java (renamed from plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/RequireVarPacket.java)6
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/VarDataPackage.java (renamed from plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/VarDataPacket.java)6
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/RuntimeHandlerManager.java6
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/handlers/BreakpointRuntimeHandler.java6
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/handlers/CommandRuntimeHandler.java4
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/handlers/EventRuntimeHandler.java16
-rw-r--r--plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/handlers/VariablesRuntimeHandler.java16
-rw-r--r--plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/PluginExtensionManager.java20
-rw-r--r--plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/handlers/BreakpointPluginHandler.java6
-rw-r--r--plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/handlers/CommandPluginHandler.java4
-rw-r--r--plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/handlers/EventPluginHandler.java24
-rw-r--r--plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/handlers/VariablesPluginHandler.java16
24 files changed, 174 insertions, 174 deletions
diff --git a/plugins/org.eclipse.emf.mwe.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.mwe.core/META-INF/MANIFEST.MF
index 140df19..42a4cc9 100644
--- a/plugins/org.eclipse.emf.mwe.core/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.mwe.core/META-INF/MANIFEST.MF
@@ -29,7 +29,7 @@ Export-Package: org.eclipse.emf.mwe.core,
org.eclipse.emf.mwe.internal.core.ast.util;x-friends:="org.eclipse.emf.mwe.ui,org.eclipse.emf.mwe.core.tests",
org.eclipse.emf.mwe.internal.core.ast.util.converter;x-friends:="org.eclipse.emf.mwe.core.tests",
org.eclipse.emf.mwe.internal.core.debug.communication;x-friends:="org.eclipse.emf.mwe.ui,org.eclipse.emf.mwe.core.tests",
- org.eclipse.emf.mwe.internal.core.debug.communication.packets;x-friends:="org.eclipse.emf.mwe.ui,org.eclipse.emf.mwe.core.tests",
+ org.eclipse.emf.mwe.internal.core.debug.communication.packages;x-friends:="org.eclipse.emf.mwe.ui,org.eclipse.emf.mwe.core.tests",
org.eclipse.emf.mwe.internal.core.debug.model;x-friends:="org.eclipse.emf.mwe.ui,org.eclipse.emf.mwe.core.tests",
org.eclipse.emf.mwe.internal.core.debug.mwe;x-friends:="org.eclipse.emf.mwe.ui,org.eclipse.emf.mwe.core.tests",
org.eclipse.emf.mwe.internal.core.debug.processing;x-friends:="org.eclipse.emf.mwe.ui,org.eclipse.emf.mwe.core.tests",
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/Connection.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/Connection.java
index 59b1208..b2f64e3 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/Connection.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/Connection.java
@@ -19,11 +19,11 @@ import java.lang.reflect.InvocationTargetException;
import java.net.ServerSocket;
import java.net.Socket;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.AbstractPacket;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.HandshakePacket;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.AbstractPackage;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.HandshakePackage;
/**
- * This class implements a socket connection model. "Packets" (units of information) can be transfered between two
+ * This class implements a socket connection model. "Packages" (units of information) can be transfered between two
* different virtual machines. During the initialisation of a socket connection a reader and a writer thread are
* established. This class can be used both on the sender and receiver side.
*/
@@ -37,26 +37,26 @@ public class Connection {
private DataInputStream in;
- private PacketSender sender;
+ private PackageSender sender;
- private PacketReceiver receiver;
+ private PackageReceiver receiver;
// -------------------------------------------------------------------------
// *the* main operation methods
- public AbstractPacket listenForPacket(final Class<? extends AbstractPacket> type) throws InterruptedIOException {
- return receiver.getPacket(type, -1);
+ public AbstractPackage listenForPackage(final Class<? extends AbstractPackage> type) throws InterruptedIOException {
+ return receiver.getPackage(type, -1);
}
- public AbstractPacket listenForPacket(final Class<? extends AbstractPacket> type, final int refId) throws InterruptedIOException {
- return receiver.getPacket(type, refId, -1);
+ public AbstractPackage listenForPackage(final Class<? extends AbstractPackage> type, final int refId) throws InterruptedIOException {
+ return receiver.getPackage(type, refId, -1);
}
- public int sendPacket(final AbstractPacket packet) throws IOException {
+ public int sendPackage(final AbstractPackage packet) throws IOException {
if (sender == null) {
return -1;
}
- return sender.sendPacket(packet);
+ return sender.sendPackage(packet);
}
// -------------------------------------------------------------------------
@@ -134,23 +134,23 @@ public class Connection {
}
// -------------------------------------------------------------------------
- // the real sending and receiving of packets to be called from PacketReceiver and PacketSender only
+ // the real sending and receiving of packages to be called from PackageReceiver and PackageSender only
- protected AbstractPacket readPacket() throws IOException {
+ protected AbstractPackage readPackage() throws IOException {
String className = in.readUTF();
- AbstractPacket packet = instantiatePacket(className);
+ AbstractPackage packet = instantiatePackage(className);
packet.readContent(in);
// System.out.println(Thread.currentThread().getName() + "-RECEIVED-: " + packet);
return packet;
}
@SuppressWarnings("unchecked")
- private AbstractPacket instantiatePacket(final String className) throws IOException {
- Class<? extends AbstractPacket> packetClass = null;
- AbstractPacket packet = null;
+ private AbstractPackage instantiatePackage(final String className) throws IOException {
+ Class<? extends AbstractPackage> packetClass = null;
+ AbstractPackage packet = null;
String msg = null;
try {
- packetClass = (Class<? extends AbstractPacket>) Class.forName(className);
+ packetClass = (Class<? extends AbstractPackage>) Class.forName(className);
} catch (ClassNotFoundException e) {
msg = "Couldn't find " + className + " in the classpath.";
}
@@ -165,7 +165,7 @@ public class Connection {
}
}
try {
- packet = (AbstractPacket) c.newInstance(initargs);
+ packet = (AbstractPackage) c.newInstance(initargs);
} catch (IllegalArgumentException e) {
msg = "Couldn't instantiate " + c + " : " + e;
} catch (InstantiationException e) {
@@ -184,7 +184,7 @@ public class Connection {
return packet;
}
- protected void writePacket(final AbstractPacket packet) throws IOException {
+ protected void writePackage(final AbstractPackage packet) throws IOException {
out.writeUTF(packet.getClass().getName());
packet.writeContent(out);
// System.out.println(Thread.currentThread().getName() + "-SENT-----: " + packet);
@@ -197,20 +197,20 @@ public class Connection {
in = new DataInputStream(socket.getInputStream());
// start receiver and sender in extra threads
- receiver = PacketReceiver.newPacketReceiver(this);
- sender = PacketSender.newPacketSender(this);
+ receiver = PackageReceiver.newPackageReceiver(this);
+ sender = PackageSender.newPackageSender(this);
}
private boolean writeHandshake() throws IOException {
- AbstractPacket packet = new HandshakePacket();
- sendPacket(packet);
- return listenForPacket(HandshakePacket.class).getClass().equals(HandshakePacket.class);
+ AbstractPackage packet = new HandshakePackage();
+ sendPackage(packet);
+ return listenForPackage(HandshakePackage.class).getClass().equals(HandshakePackage.class);
}
private void replyHandshake() throws IOException {
- if (listenForPacket(HandshakePacket.class).getClass().equals(HandshakePacket.class)) {
- sendPacket(new HandshakePacket());
+ if (listenForPackage(HandshakePackage.class).getClass().equals(HandshakePackage.class)) {
+ sendPackage(new HandshakePackage());
} else {
throw new IOException("handshake failed");
}
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/PacketReceiver.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/PackageReceiver.java
index 8c31c92..d4b16a2 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/PacketReceiver.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/PackageReceiver.java
@@ -16,16 +16,16 @@ import java.util.ArrayList;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.AbstractPacket;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.AbstractPackage;
/**
- * This Runnable listens for incoming packets asynchroniously and keeps them, until they are required by
+ * This Runnable listens for incoming packages asynchroniously and keeps them, until they are required by
* customers.
*/
-public class PacketReceiver implements Runnable {
- private final ArrayList<AbstractPacket> receivedPackets;
+public class PackageReceiver implements Runnable {
+ private final ArrayList<AbstractPackage> receivedPackages;
- private static final Log logger = LogFactory.getLog(PacketReceiver.class);
+ private static final Log logger = LogFactory.getLog(PackageReceiver.class);
private final Connection connection;
@@ -39,17 +39,17 @@ public class PacketReceiver implements Runnable {
* @param connection the <code>Connection</code> that controls this data receiver.
* @return the instance
*/
- public static PacketReceiver newPacketReceiver(final Connection connection) {
- PacketReceiver receiver = new PacketReceiver(connection);
- Thread thread = new Thread(receiver, "PacketReceiver");
+ public static PackageReceiver newPackageReceiver(final Connection connection) {
+ PackageReceiver receiver = new PackageReceiver(connection);
+ Thread thread = new Thread(receiver, "PackageReceiver");
thread.setDaemon(true);
thread.start();
return receiver;
}
- private PacketReceiver(final Connection connection) {
+ private PackageReceiver(final Connection connection) {
this.connection = connection;
- receivedPackets = new ArrayList<AbstractPacket>();
+ receivedPackages = new ArrayList<AbstractPackage>();
}
/**
@@ -61,8 +61,8 @@ public class PacketReceiver implements Runnable {
* @return the received packet
* @throws InterruptedIOException
*/
- public AbstractPacket getPacket(final Class<? extends AbstractPacket> type, final long timeToWait) throws InterruptedIOException {
- return getPacket(type, 0, timeToWait);
+ public AbstractPackage getPackage(final Class<? extends AbstractPackage> type, final long timeToWait) throws InterruptedIOException {
+ return getPackage(type, 0, timeToWait);
}
/**
@@ -76,20 +76,20 @@ public class PacketReceiver implements Runnable {
* @throws InterruptedIOException
* @throws InterruptedIOException
*/
- public AbstractPacket getPacket(final Class<? extends AbstractPacket> type, final int refId, final long timeToWait) throws InterruptedIOException {
- AbstractPacket packet = null;
+ public AbstractPackage getPackage(final Class<? extends AbstractPackage> type, final int refId, final long timeToWait) throws InterruptedIOException {
+ AbstractPackage packet = null;
//sync to be able to wait
- synchronized (receivedPackets) {
+ synchronized (receivedPackages) {
long remainingTime = timeToWait;
long timeBeforeWait;
// Wait until type is available.
- while (((packet = popReceivedPacket(type, refId)) == null) && connection.isConnected() && !interrupt
+ while (((packet = popReceivedPackage(type, refId)) == null) && connection.isConnected() && !interrupt
&& ((timeToWait < 0) || (remainingTime > 0))) {
timeBeforeWait = System.currentTimeMillis();
try {
- waitForPacketAvailable(remainingTime);
+ waitForPackageAvailable(remainingTime);
} catch (InterruptedException e) {
}
if (timeToWait >= 0) {
@@ -103,36 +103,36 @@ public class PacketReceiver implements Runnable {
private void close() {
interrupt = true;
- synchronized (receivedPackets) {
- receivedPackets.notifyAll();
+ synchronized (receivedPackages) {
+ receivedPackages.notifyAll();
}
}
- private void waitForPacketAvailable(final long timeToWait) throws InterruptedException {
+ private void waitForPackageAvailable(final long timeToWait) throws InterruptedException {
if (timeToWait == 0) {
return;
} else if (timeToWait < 0) {
- receivedPackets.wait();
+ receivedPackages.wait();
} else {
- receivedPackets.wait(timeToWait);
+ receivedPackages.wait(timeToWait);
}
}
/**
* Returns the first packet of the specified type and removes from the packet list.
*/
- private synchronized AbstractPacket popReceivedPacket(final Class<? extends AbstractPacket> type, final int refId) {
- for (AbstractPacket packet : receivedPackets) {
+ private synchronized AbstractPackage popReceivedPackage(final Class<? extends AbstractPackage> type, final int refId) {
+ for (AbstractPackage packet : receivedPackages) {
if (!type.isInstance(packet) || ((refId != 0) && (packet.refId != refId))) {
continue;
}
- receivedPackets.remove(packet);
+ receivedPackages.remove(packet);
return packet;
}
return null;
}
- private void checkForException(final AbstractPacket packet) throws InterruptedIOException {
+ private void checkForException(final AbstractPackage packet) throws InterruptedIOException {
if (packet != null) {
return;
}
@@ -157,7 +157,7 @@ public class PacketReceiver implements Runnable {
public void run() {
try {
while (!interrupt && connection.isConnected()) {
- readAvailablePacket();
+ readAvailablePackage();
}
} catch (Exception e) {
exception = e;
@@ -165,14 +165,14 @@ public class PacketReceiver implements Runnable {
}
}
- private void readAvailablePacket() throws IOException {
- addPacketToList(connection.readPacket());
+ private void readAvailablePackage() throws IOException {
+ addPackageToList(connection.readPackage());
}
- private void addPacketToList(final AbstractPacket packet) {
- synchronized (receivedPackets) {
- receivedPackets.add(packet);
- receivedPackets.notifyAll();
+ private void addPackageToList(final AbstractPackage packet) {
+ synchronized (receivedPackages) {
+ receivedPackages.add(packet);
+ receivedPackages.notifyAll();
}
}
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/PacketSender.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/PackageSender.java
index 624b4d9..8cb8305 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/PacketSender.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/PackageSender.java
@@ -16,16 +16,16 @@ import java.util.ArrayList;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.AbstractPacket;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.AbstractPackage;
/**
- * This Runnable sends packets out asynchroniously as they arrive from customers.
+ * This Runnable sends packages out asynchroniously as they arrive from customers.
*/
-public class PacketSender implements Runnable {
+public class PackageSender implements Runnable {
- private final ArrayList<AbstractPacket> outgoingPackets;
+ private final ArrayList<AbstractPackage> outgoingPackages;
- private static final Log logger = LogFactory.getLog(PacketSender.class);
+ private static final Log logger = LogFactory.getLog(PackageSender.class);
private final Connection connection;
@@ -37,17 +37,17 @@ public class PacketSender implements Runnable {
* @param connection the <code>Connection</code> that controls this data receiver.
* @return the instance
*/
- public static PacketSender newPacketSender(final Connection connection) {
- PacketSender sender = new PacketSender(connection);
- Thread thread = new Thread(sender, "PacketSender");
+ public static PackageSender newPackageSender(final Connection connection) {
+ PackageSender sender = new PackageSender(connection);
+ Thread thread = new Thread(sender, "PackageSender");
thread.setDaemon(true);
thread.start();
return sender;
}
- private PacketSender(final Connection connection) {
+ private PackageSender(final Connection connection) {
this.connection = connection;
- outgoingPackets = new ArrayList<AbstractPacket>();
+ outgoingPackages = new ArrayList<AbstractPackage>();
}
/**
@@ -57,15 +57,15 @@ public class PacketSender implements Runnable {
* @return the packet id after it was sent
* @throws InterruptedIOException
*/
- public int sendPacket(final AbstractPacket packet) throws InterruptedIOException {
+ public int sendPackage(final AbstractPackage packet) throws InterruptedIOException {
if (!connection.isConnected()) {
throw new InterruptedIOException();
// log.debug("send: " + packet);
}
- synchronized (outgoingPackets) {
- outgoingPackets.add(packet);
- outgoingPackets.notifyAll();
+ synchronized (outgoingPackages) {
+ outgoingPackages.add(packet);
+ outgoingPackages.notifyAll();
}
return packet.getId();
}
@@ -75,8 +75,8 @@ public class PacketSender implements Runnable {
*/
public void close() {
interrupt = true;
- synchronized (outgoingPackets) {
- outgoingPackets.notifyAll();
+ synchronized (outgoingPackages) {
+ outgoingPackages.notifyAll();
}
}
@@ -88,7 +88,7 @@ public class PacketSender implements Runnable {
public void run() {
while (!interrupt && connection.isConnected()) {
try {
- sendAvailablePackets();
+ sendAvailablePackages();
} catch (Exception e) {
if (!(e instanceof IOException)) {
logger.error(e.getMessage(), e);
@@ -99,21 +99,21 @@ public class PacketSender implements Runnable {
connection.close();
}
- private void sendAvailablePackets() throws IOException {
- ArrayList<AbstractPacket> packetsToSend = new ArrayList<AbstractPacket>();
- synchronized (outgoingPackets) {
- while (!interrupt && outgoingPackets.isEmpty()) {
+ private void sendAvailablePackages() throws IOException {
+ ArrayList<AbstractPackage> packagesToSend = new ArrayList<AbstractPackage>();
+ synchronized (outgoingPackages) {
+ while (!interrupt && outgoingPackages.isEmpty()) {
try {
- outgoingPackets.wait();
+ outgoingPackages.wait();
} catch (InterruptedException e) {
}
}
- packetsToSend.addAll(outgoingPackets);
- outgoingPackets.clear();
+ packagesToSend.addAll(outgoingPackages);
+ outgoingPackages.clear();
}
- for (AbstractPacket packet : packetsToSend) {
- connection.writePacket(packet);
+ for (AbstractPackage packet : packagesToSend) {
+ connection.writePackage(packet);
}
}
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/AbstractPacket.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/AbstractPackage.java
index 20f2626..8e4ea6e 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/AbstractPacket.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/AbstractPackage.java
@@ -8,18 +8,18 @@
* Contributors:
* committers of openArchitectureWare - initial API and implementation
*******************************************************************************/
-package org.eclipse.emf.mwe.internal.core.debug.communication.packets;
+package org.eclipse.emf.mwe.internal.core.debug.communication.packages;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
/**
- * The base class for all types of packets. It has the id and refId. Inheriting classes must call setNextId to get
+ * The base class for all types of packages. It has the id and refId. Inheriting classes must call setNextId to get
* a valid id.
*
*/
-public abstract class AbstractPacket {
+public abstract class AbstractPackage {
protected int id;
public int refId;
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/BreakpointPacket.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/BreakpointPackage.java
index bd9a1e4..5d25dd3 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/BreakpointPacket.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/BreakpointPackage.java
@@ -8,7 +8,7 @@
* Contributors:
* committers of openArchitectureWare - initial API and implementation
*******************************************************************************/
-package org.eclipse.emf.mwe.internal.core.debug.communication.packets;
+package org.eclipse.emf.mwe.internal.core.debug.communication.packages;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -19,7 +19,7 @@ import org.eclipse.emf.mwe.core.debug.model.SyntaxElement;
/**
* The packet to communicate set and delete of breakpoints.
*/
-public class BreakpointPacket extends AbstractPacket {
+public class BreakpointPackage extends AbstractPackage {
public int type;
@@ -27,7 +27,7 @@ public class BreakpointPacket extends AbstractPacket {
// -------------------------------------------------------------------------
- public BreakpointPacket(final int type, final SyntaxElement se) {
+ public BreakpointPackage(final int type, final SyntaxElement se) {
super();
this.type = type;
this.se = se;
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/CommandPacket.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/CommandPackage.java
index 366f86e..5dd7189 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/CommandPacket.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/CommandPackage.java
@@ -8,7 +8,7 @@
* Contributors:
* committers of openArchitectureWare - initial API and implementation
*******************************************************************************/
-package org.eclipse.emf.mwe.internal.core.debug.communication.packets;
+package org.eclipse.emf.mwe.internal.core.debug.communication.packages;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -17,13 +17,13 @@ import java.io.IOException;
/**
* The packet to communicate a process or direct command to the runtime process.
*/
-public class CommandPacket extends AbstractPacket {
+public class CommandPackage extends AbstractPackage {
public int command;
// -------------------------------------------------------------------------
- public CommandPacket(final int command) {
+ public CommandPackage(final int command) {
this.command = command;
}
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/ConfirmationPacket.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/ConfirmationPackage.java
index 95d338e..2a3c3ea 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/ConfirmationPacket.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/ConfirmationPackage.java
@@ -8,7 +8,7 @@
* Contributors:
* committers of openArchitectureWare - initial API and implementation
*******************************************************************************/
-package org.eclipse.emf.mwe.internal.core.debug.communication.packets;
+package org.eclipse.emf.mwe.internal.core.debug.communication.packages;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -17,11 +17,11 @@ import java.io.IOException;
/**
* The packet to communicate the confirmation of a specific packet reference id.
*/
-public class ConfirmationPacket extends AbstractPacket {
+public class ConfirmationPackage extends AbstractPackage {
// -------------------------------------------------------------------------
- public ConfirmationPacket(final int packId) {
+ public ConfirmationPackage(final int packId) {
refId = packId;
}
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/EventPacket.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/EventPackage.java
index e8d9f28..1f2a7c6 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/EventPacket.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/EventPackage.java
@@ -8,7 +8,7 @@
* Contributors:
* committers of openArchitectureWare - initial API and implementation
*******************************************************************************/
-package org.eclipse.emf.mwe.internal.core.debug.communication.packets;
+package org.eclipse.emf.mwe.internal.core.debug.communication.packages;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -17,13 +17,13 @@ import java.io.IOException;
/**
* The packet to communicate an event from the runtime process.
*/
-public class EventPacket extends AbstractPacket {
+public class EventPackage extends AbstractPackage {
public int event;
// -------------------------------------------------------------------------
- public EventPacket(final int event) {
+ public EventPackage(final int event) {
this.event = event;
setNextId();
}
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/EventPacketWithFrames.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/EventPackageWithFrames.java
index 043f06b..39c754c 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/EventPacketWithFrames.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/EventPackageWithFrames.java
@@ -8,7 +8,7 @@
* Contributors:
* committers of openArchitectureWare - initial API and implementation
*******************************************************************************/
-package org.eclipse.emf.mwe.internal.core.debug.communication.packets;
+package org.eclipse.emf.mwe.internal.core.debug.communication.packages;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -21,7 +21,7 @@ import org.eclipse.emf.mwe.core.debug.model.SyntaxElement;
/**
* The packet to communicate an event from the runtime process together with the current stack frame information.
*/
-public class EventPacketWithFrames extends EventPacket {
+public class EventPackageWithFrames extends EventPackage {
public int cleanStackLevel;
@@ -29,7 +29,7 @@ public class EventPacketWithFrames extends EventPacket {
// -------------------------------------------------------------------------
- public EventPacketWithFrames(final int event) {
+ public EventPackageWithFrames(final int event) {
super(event);
}
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/HandshakePacket.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/HandshakePackage.java
index 3fc3ae2..19ba2e7 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/HandshakePacket.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/HandshakePackage.java
@@ -8,7 +8,7 @@
* Contributors:
* committers of openArchitectureWare - initial API and implementation
*******************************************************************************/
-package org.eclipse.emf.mwe.internal.core.debug.communication.packets;
+package org.eclipse.emf.mwe.internal.core.debug.communication.packages;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -16,7 +16,7 @@ import java.io.DataOutputStream;
/**
* The packet to communicate a first handshake. There are no data to be communicated.
*/
-public class HandshakePacket extends AbstractPacket {
+public class HandshakePackage extends AbstractPackage {
@Override
public void readContent(final DataInputStream in) {
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/RegisterPacket.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/RegisterPackage.java
index 3ab5bb9..b79a959 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/RegisterPacket.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/RegisterPackage.java
@@ -8,7 +8,7 @@
* Contributors:
* committers of openArchitectureWare - initial API and implementation
*******************************************************************************/
-package org.eclipse.emf.mwe.internal.core.debug.communication.packets;
+package org.eclipse.emf.mwe.internal.core.debug.communication.packages;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -19,7 +19,7 @@ import java.util.List;
/**
* The packet to communicate handlers or adapter class names to be registered in the runtime process.
*/
-public class RegisterPacket extends AbstractPacket {
+public class RegisterPackage extends AbstractPackage {
public static final int HANDLERS = 1;
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/RequireVarPacket.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/RequireVarPackage.java
index 2154123..383841d 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/RequireVarPacket.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/RequireVarPackage.java
@@ -8,7 +8,7 @@
* Contributors:
* committers of openArchitectureWare - initial API and implementation
*******************************************************************************/
-package org.eclipse.emf.mwe.internal.core.debug.communication.packets;
+package org.eclipse.emf.mwe.internal.core.debug.communication.packages;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -17,7 +17,7 @@ import java.io.IOException;
/**
* The packet to communicate a request for variable from a specific frame and variable id.
*/
-public class RequireVarPacket extends AbstractPacket {
+public class RequireVarPackage extends AbstractPackage {
public int frameId;
@@ -25,7 +25,7 @@ public class RequireVarPacket extends AbstractPacket {
// -------------------------------------------------------------------------
- public RequireVarPacket(final int frameId, final int varId) {
+ public RequireVarPackage(final int frameId, final int varId) {
setNextId();
this.frameId = frameId;
this.varId = varId;
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/VarDataPacket.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/VarDataPackage.java
index 436a4f9..d0e5f94 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packets/VarDataPacket.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/communication/packages/VarDataPackage.java
@@ -8,7 +8,7 @@
* Contributors:
* committers of openArchitectureWare - initial API and implementation
*******************************************************************************/
-package org.eclipse.emf.mwe.internal.core.debug.communication.packets;
+package org.eclipse.emf.mwe.internal.core.debug.communication.packages;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -20,9 +20,9 @@ import org.eclipse.emf.mwe.internal.core.debug.model.VarValueTO;
/**
* The packet to communicate variable values for a specific reference id. Corresponds with
- * <code>RequireVarPacket</code>.
+ * <code>RequireVarPackage</code>.
*/
-public class VarDataPacket extends AbstractPacket {
+public class VarDataPackage extends AbstractPackage {
public List<VarValueTO> valueList = new ArrayList<VarValueTO>();
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/RuntimeHandlerManager.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/RuntimeHandlerManager.java
index e1a0908..ec4bc44 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/RuntimeHandlerManager.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/RuntimeHandlerManager.java
@@ -17,7 +17,7 @@ import org.apache.commons.logging.LogFactory;
import org.eclipse.emf.mwe.core.debug.processing.ElementAdapter;
import org.eclipse.emf.mwe.core.resources.ResourceLoaderFactory;
import org.eclipse.emf.mwe.internal.core.debug.communication.Connection;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.RegisterPacket;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.RegisterPackage;
/**
* This manager class listens for requests from the debug server to instantiate handlers or adapters.<br>
@@ -71,11 +71,11 @@ public class RuntimeHandlerManager implements Runnable {
private void listenAndRegisterClasses() throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException {
- RegisterPacket packet = (RegisterPacket) connection.listenForPacket(RegisterPacket.class);
+ RegisterPackage packet = (RegisterPackage) connection.listenForPackage(RegisterPackage.class);
String msg = null;
- if (packet.type == RegisterPacket.HANDLERS) {
+ if (packet.type == RegisterPackage.HANDLERS) {
RuntimeHandler handler = null;
for (String className : packet.classNames) {
final Class<?> clazz = ResourceLoaderFactory.createResourceLoader().loadClass(className);
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/handlers/BreakpointRuntimeHandler.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/handlers/BreakpointRuntimeHandler.java
index 5588daa..e20aeeb 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/handlers/BreakpointRuntimeHandler.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/handlers/BreakpointRuntimeHandler.java
@@ -17,7 +17,7 @@ import java.util.List;
import org.eclipse.emf.mwe.core.debug.model.SyntaxElement;
import org.eclipse.emf.mwe.core.debug.processing.ElementAdapter;
import org.eclipse.emf.mwe.internal.core.debug.communication.Connection;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.BreakpointPacket;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.BreakpointPackage;
import org.eclipse.emf.mwe.internal.core.debug.processing.DebugMonitor;
import org.eclipse.emf.mwe.internal.core.debug.processing.ProcessHandler;
import org.eclipse.emf.mwe.internal.core.debug.processing.RuntimeHandler;
@@ -85,10 +85,10 @@ public class BreakpointRuntimeHandler implements RuntimeHandler, ProcessHandler,
}
private void listenAndDispatchCommand() throws IOException {
- handle((BreakpointPacket) connection.listenForPacket(BreakpointPacket.class));
+ handle((BreakpointPackage) connection.listenForPackage(BreakpointPackage.class));
}
- private void handle(final BreakpointPacket packet) {
+ private void handle(final BreakpointPackage packet) {
switch (packet.type) {
case SET:
doSet(packet.se, null, 0);
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/handlers/CommandRuntimeHandler.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/handlers/CommandRuntimeHandler.java
index ea8d4dd..57a55e6 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/handlers/CommandRuntimeHandler.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/handlers/CommandRuntimeHandler.java
@@ -14,7 +14,7 @@ import java.io.IOException;
import java.util.Stack;
import org.eclipse.emf.mwe.internal.core.debug.communication.Connection;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.CommandPacket;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.CommandPackage;
import org.eclipse.emf.mwe.internal.core.debug.processing.DebugMonitor;
import org.eclipse.emf.mwe.internal.core.debug.processing.CommandListener;
import org.eclipse.emf.mwe.internal.core.debug.processing.EventHandler;
@@ -112,7 +112,7 @@ public class CommandRuntimeHandler implements RuntimeHandler, CommandListener, P
}
private void listenAndDispatchCommand() throws IOException {
- dispatch(((CommandPacket) connection.listenForPacket(CommandPacket.class)).command);
+ dispatch(((CommandPackage) connection.listenForPackage(CommandPackage.class)).command);
}
private void dispatch(final int cmd) {
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/handlers/EventRuntimeHandler.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/handlers/EventRuntimeHandler.java
index 548e1f3..b677ba4 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/handlers/EventRuntimeHandler.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/handlers/EventRuntimeHandler.java
@@ -16,9 +16,9 @@ import java.util.Stack;
import org.eclipse.emf.mwe.core.debug.model.SyntaxElement;
import org.eclipse.emf.mwe.core.debug.processing.ElementAdapter;
import org.eclipse.emf.mwe.internal.core.debug.communication.Connection;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.ConfirmationPacket;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.EventPacket;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.EventPacketWithFrames;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.ConfirmationPackage;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.EventPackage;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.EventPackageWithFrames;
import org.eclipse.emf.mwe.internal.core.debug.processing.DebugMonitor;
import org.eclipse.emf.mwe.internal.core.debug.processing.EventHandler;
import org.eclipse.emf.mwe.internal.core.debug.processing.RuntimeHandler;
@@ -106,7 +106,7 @@ public class EventRuntimeHandler implements RuntimeHandler, EventHandler {
* @see org.eclipse.emf.mwe.internal.core.debug.processing.EventHandler#suspended()
*/
public void suspended() throws IOException {
- EventPacketWithFrames event = new EventPacketWithFrames(SUSPENDED);
+ EventPackageWithFrames event = new EventPackageWithFrames(SUSPENDED);
event.cleanStackLevel = cleanStackLevel;
for (int i = cleanStackLevel; i < stackFrames.size(); i++) {
@@ -150,13 +150,13 @@ public class EventRuntimeHandler implements RuntimeHandler, EventHandler {
// -------------------------------------------------------------------------
private void sendEvent(final int type) throws IOException {
- EventPacket event = new EventPacket(type);
+ EventPackage event = new EventPackage(type);
sendAndConfirm(event);
}
- private void sendAndConfirm(final EventPacket event) throws IOException {
- int refId = connection.sendPacket(event);
- connection.listenForPacket(ConfirmationPacket.class, refId);
+ private void sendAndConfirm(final EventPackage event) throws IOException {
+ int refId = connection.sendPackage(event);
+ connection.listenForPackage(ConfirmationPackage.class, refId);
}
// -------------------------------------------------------------------------
diff --git a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/handlers/VariablesRuntimeHandler.java b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/handlers/VariablesRuntimeHandler.java
index 0d9b05f..0cc6cb7 100644
--- a/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/handlers/VariablesRuntimeHandler.java
+++ b/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/internal/core/debug/processing/handlers/VariablesRuntimeHandler.java
@@ -19,8 +19,8 @@ import java.util.Stack;
import org.eclipse.emf.mwe.core.debug.processing.ElementAdapter;
import org.eclipse.emf.mwe.internal.core.debug.communication.Connection;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.RequireVarPacket;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.VarDataPacket;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.RequireVarPackage;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.VarDataPackage;
import org.eclipse.emf.mwe.internal.core.debug.model.NameValuePair;
import org.eclipse.emf.mwe.internal.core.debug.model.VarValue;
import org.eclipse.emf.mwe.internal.core.debug.model.VarValueTO;
@@ -83,25 +83,25 @@ public class VariablesRuntimeHandler implements RuntimeHandler, EventHandler, Ru
public void run() {
try {
while (true) {
- handle((RequireVarPacket) connection.listenForPacket(RequireVarPacket.class));
+ handle((RequireVarPackage) connection.listenForPackage(RequireVarPackage.class));
}
} catch (IOException e) {
}
}
- private void handle(final RequireVarPacket packet) throws IOException {
+ private void handle(final RequireVarPackage packet) throws IOException {
List<VarValueTO> values;
if (packet.varId == 0) {
values = getFrameVariables(packet.frameId);
} else {
values = getSubVariables(packet.frameId, packet.varId);
}
- VarDataPacket varPacket = new VarDataPacket();
+ VarDataPackage varPackage = new VarDataPackage();
if (values != null) {
- varPacket.valueList = values;
+ varPackage.valueList = values;
}
- varPacket.refId = packet.getId();
- connection.sendPacket(varPacket);
+ varPackage.refId = packet.getId();
+ connection.sendPackage(varPackage);
}
// In case there is no varId in the request the top level variables will be collected.
diff --git a/plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/PluginExtensionManager.java b/plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/PluginExtensionManager.java
index 14de55b..302cb48 100644
--- a/plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/PluginExtensionManager.java
+++ b/plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/PluginExtensionManager.java
@@ -20,7 +20,7 @@ import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.core.DebugException;
import org.eclipse.emf.mwe.internal.core.debug.communication.Connection;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.RegisterPacket;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.RegisterPackage;
import org.eclipse.emf.mwe.internal.core.debug.processing.handlers.CommandRuntimeHandler;
import org.eclipse.emf.mwe.internal.core.debug.processing.handlers.EventRuntimeHandler;
import org.eclipse.emf.mwe.internal.ui.debug.processing.handlers.BreakpointPluginHandler;
@@ -114,8 +114,8 @@ public class PluginExtensionManager {
// -------------------------------------------------------------------------
private void collectInitialCommunicationHandlers() throws IOException {
- RegisterPacket packet = new RegisterPacket();
- packet.type = RegisterPacket.HANDLERS;
+ RegisterPackage packet = new RegisterPackage();
+ packet.type = RegisterPackage.HANDLERS;
CommandPluginHandler cHandler = new CommandPluginHandler();
cHandler.setConnection(connection);
@@ -128,12 +128,12 @@ public class PluginExtensionManager {
eHandler.setDmm(dmm);
packet.classNames.add(EventRuntimeHandler.class.getName());
- connection.sendPacket(packet);
+ connection.sendPackage(packet);
}
private void collectHandlersFromExtensions() throws IOException {
- RegisterPacket packet = new RegisterPacket();
- packet.type = RegisterPacket.HANDLERS;
+ RegisterPackage packet = new RegisterPackage();
+ packet.type = RegisterPackage.HANDLERS;
IExtensionRegistry reg = Platform.getExtensionRegistry();
IConfigurationElement[] elems = reg
.getConfigurationElementsFor("org.eclipse.emf.mwe.ui.debugHandlers");
@@ -174,12 +174,12 @@ public class PluginExtensionManager {
}
// TODO: CK: test: what happens when a handler is not there? Exception? to be tested and corrected if necessary
- connection.sendPacket(packet);
+ connection.sendPackage(packet);
}
private void collectRuntimeAdaptersFromExtensions() throws IOException {
- RegisterPacket packet = new RegisterPacket();
- packet.type = RegisterPacket.ADAPTERS;
+ RegisterPackage packet = new RegisterPackage();
+ packet.type = RegisterPackage.ADAPTERS;
IExtensionRegistry reg = Platform.getExtensionRegistry();
IConfigurationElement[] elems = reg
.getConfigurationElementsFor("org.eclipse.emf.mwe.ui.debugAdapters");
@@ -191,7 +191,7 @@ public class PluginExtensionManager {
}
}
}
- connection.sendPacket(packet);
+ connection.sendPackage(packet);
}
diff --git a/plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/handlers/BreakpointPluginHandler.java b/plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/handlers/BreakpointPluginHandler.java
index b21750c..a5c9389 100644
--- a/plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/handlers/BreakpointPluginHandler.java
+++ b/plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/handlers/BreakpointPluginHandler.java
@@ -16,7 +16,7 @@ import static org.eclipse.emf.mwe.internal.core.debug.processing.handlers.Breakp
import java.io.IOException;
import org.eclipse.emf.mwe.internal.core.debug.communication.Connection;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.BreakpointPacket;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.BreakpointPackage;
import org.eclipse.emf.mwe.internal.ui.debug.model.MWEBreakpoint;
import org.eclipse.emf.mwe.internal.ui.debug.processing.DebugModelManager;
import org.eclipse.emf.mwe.internal.ui.debug.processing.PluginHandler;
@@ -41,11 +41,11 @@ public class BreakpointPluginHandler implements PluginHandler {
// -------------------------------------------------------------------------
public void sendSetBreakpoint(final MWEBreakpoint bp) throws IOException {
- connection.sendPacket(new BreakpointPacket(SET, bp.createTO()));
+ connection.sendPackage(new BreakpointPackage(SET, bp.createTO()));
}
public void sendRemoveBreakpoint(final MWEBreakpoint bp) throws IOException {
- connection.sendPacket(new BreakpointPacket(REMOVE, bp.createTO()));
+ connection.sendPackage(new BreakpointPackage(REMOVE, bp.createTO()));
}
}
diff --git a/plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/handlers/CommandPluginHandler.java b/plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/handlers/CommandPluginHandler.java
index ff59826..92c7b0a 100644
--- a/plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/handlers/CommandPluginHandler.java
+++ b/plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/handlers/CommandPluginHandler.java
@@ -21,7 +21,7 @@ import java.io.IOException;
import org.eclipse.debug.core.DebugException;
import org.eclipse.emf.mwe.internal.core.debug.communication.Connection;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.CommandPacket;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.CommandPackage;
import org.eclipse.emf.mwe.internal.ui.workflow.Activator;
/**
@@ -67,7 +67,7 @@ public class CommandPluginHandler {
private void sendCommand(final int type) throws DebugException {
try {
- connection.sendPacket(new CommandPacket(type));
+ connection.sendPackage(new CommandPackage(type));
} catch (IOException e) {
throw new DebugException(Activator
.createErrorStatus("lost connection to debugger runtime process", e));
diff --git a/plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/handlers/EventPluginHandler.java b/plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/handlers/EventPluginHandler.java
index c1099a4..f57f4b4 100644
--- a/plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/handlers/EventPluginHandler.java
+++ b/plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/handlers/EventPluginHandler.java
@@ -19,10 +19,10 @@ import java.io.IOException;
import org.eclipse.debug.core.DebugException;
import org.eclipse.emf.mwe.internal.core.debug.communication.Connection;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.AbstractPacket;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.ConfirmationPacket;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.EventPacket;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.EventPacketWithFrames;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.AbstractPackage;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.ConfirmationPackage;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.EventPackage;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.EventPackageWithFrames;
import org.eclipse.emf.mwe.internal.ui.debug.processing.DebugModelManager;
import org.eclipse.emf.mwe.internal.ui.workflow.Activator;
@@ -37,7 +37,7 @@ public class EventPluginHandler implements Runnable {
private DebugModelManager dmm;
- private final Class<? extends AbstractPacket> typeToListen = EventPacket.class;
+ private final Class<? extends AbstractPackage> typeToListen = EventPackage.class;
// -------------------------------------------------------------------------
@@ -50,7 +50,7 @@ public class EventPluginHandler implements Runnable {
this.dmm = dmm;
}
- public Class<? extends AbstractPacket> getPacketType() {
+ public Class<? extends AbstractPackage> getPackageType() {
return typeToListen;
}
@@ -69,14 +69,14 @@ public class EventPluginHandler implements Runnable {
public void run() {
try {
while (true) {
- dispatch((EventPacket) connection.listenForPacket(typeToListen));
+ dispatch((EventPackage) connection.listenForPackage(typeToListen));
}
} catch (Exception e) {
connection.close();
}
}
- private void dispatch(final EventPacket packet) throws DebugException {
+ private void dispatch(final EventPackage packet) throws DebugException {
dmm.getThread().setBreakpoint(null);
switch (packet.event) {
@@ -98,17 +98,17 @@ public class EventPluginHandler implements Runnable {
return;
}
- ConfirmationPacket conf = new ConfirmationPacket(packet.getId());
+ ConfirmationPackage conf = new ConfirmationPackage(packet.getId());
try {
- connection.sendPacket(conf);
+ connection.sendPackage(conf);
} catch (IOException e) {
throw new DebugException(Activator.createErrorStatus(
"lost connection to debugger runtime process --> aborting", e));
}
}
- private void adaptStackFrames(final EventPacket sp) {
- EventPacketWithFrames packet = (EventPacketWithFrames) sp;
+ private void adaptStackFrames(final EventPackage sp) {
+ EventPackageWithFrames packet = (EventPackageWithFrames) sp;
dmm.adaptStackFrames(packet.cleanStackLevel, packet.frames);
}
diff --git a/plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/handlers/VariablesPluginHandler.java b/plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/handlers/VariablesPluginHandler.java
index 818140b..1f39d1f 100644
--- a/plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/handlers/VariablesPluginHandler.java
+++ b/plugins/org.eclipse.emf.mwe.ui/src/org/eclipse/emf/mwe/internal/ui/debug/processing/handlers/VariablesPluginHandler.java
@@ -14,8 +14,8 @@ import java.io.IOException;
import java.util.List;
import org.eclipse.emf.mwe.internal.core.debug.communication.Connection;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.RequireVarPacket;
-import org.eclipse.emf.mwe.internal.core.debug.communication.packets.VarDataPacket;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.RequireVarPackage;
+import org.eclipse.emf.mwe.internal.core.debug.communication.packages.VarDataPackage;
import org.eclipse.emf.mwe.internal.core.debug.model.VarValueTO;
import org.eclipse.emf.mwe.internal.ui.debug.processing.DebugModelManager;
import org.eclipse.emf.mwe.internal.ui.debug.processing.PluginHandler;
@@ -40,15 +40,15 @@ public class VariablesPluginHandler implements PluginHandler {
// -------------------------------------------------------------------------
public List<VarValueTO> sendRequireVariables(final int frameId) throws IOException {
- RequireVarPacket packet = new RequireVarPacket(frameId, 0);
- int refId = connection.sendPacket(packet);
- return ((VarDataPacket) connection.listenForPacket(VarDataPacket.class, refId)).valueList;
+ RequireVarPackage packet = new RequireVarPackage(frameId, 0);
+ int refId = connection.sendPackage(packet);
+ return ((VarDataPackage) connection.listenForPackage(VarDataPackage.class, refId)).valueList;
}
public List<VarValueTO> sendRequireSubVariables(final int frameId, final int varId) throws IOException {
- RequireVarPacket packet = new RequireVarPacket(frameId, varId);
- int refId = connection.sendPacket(packet);
- return ((VarDataPacket) connection.listenForPacket(VarDataPacket.class, refId)).valueList;
+ RequireVarPackage packet = new RequireVarPackage(frameId, varId);
+ int refId = connection.sendPackage(packet);
+ return ((VarDataPackage) connection.listenForPackage(VarDataPackage.class, refId)).valueList;
}
}