From b7d2ba25fdb85fe2e3a345d74c207f9a2d435576 Mon Sep 17 00:00:00 2001 From: incastrix Date: Wed, 23 Dec 2009 17:34:52 +0000 Subject: [PATCH] Refactory: remove unused classes, imports, fields and methods. --- .../phpdt/internal/debug/core/PHPDBGBase.java | 24 ++-- .../phpdt/internal/debug/core/PHPDBGInterface.java | 108 ++++++++++---------- .../phpdt/internal/debug/core/PHPDBGMod.java | 10 +- .../phpdt/internal/debug/core/PHPDBGProxy.java | 50 +++++----- .../internal/debug/core/PHPDebugCorePlugin.java | 36 ++++---- .../debug/core/PHPDegugCorePluginImages.java | 10 +- 6 files changed, 119 insertions(+), 119 deletions(-) diff --git a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGBase.java b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGBase.java index 86a45cc..56fa8d1 100644 --- a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGBase.java +++ b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGBase.java @@ -167,18 +167,18 @@ public class PHPDBGBase { * @return The string which contains the bytes as strings. * E.g.: (123) (11) (46) (213) ... */ - public static String CharArrayToString (char[] cha) { - String ret = new String (); - int i; - int p; - - for (i = 0; i < cha.length; i++) { // For all bytes within the input buffer - p = (int) cha[i]; // Convert the byte into an integer value - ret = ret + "(" + String.valueOf (p) + ") "; // Add the value - } - - return ret; - } +// public static String CharArrayToString (char[] cha) { +// String ret = new String (); +// int i; +// int p; +// +// for (i = 0; i < cha.length; i++) { // For all bytes within the input buffer +// p = (int) cha[i]; // Convert the byte into an integer value +// ret = ret + "(" + String.valueOf (p) + ") "; // Add the value +// } +// +// return ret; +// } /** * diff --git a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGInterface.java b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGInterface.java index 4701d0b..4da1970 100644 --- a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGInterface.java +++ b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGInterface.java @@ -49,7 +49,7 @@ public class PHPDBGInterface { private String evalRet = new String(""); private int rawCounter = 1000; // An rawData frame ID counter private PHPDBGProxy proxy = null; - private int lastCmd = -1; + //private int lastCmd = -1; private int sid = 0; private boolean stopOnError = false; private char[] lastCommand = new char[4]; @@ -96,21 +96,21 @@ public class PHPDBGInterface { * Is this method used anywhere? * */ - public void requestDBGVersion () throws IOException { - PHPDBGPacket DBGPacket; // A DBG message packet - PHPDBGFrame DBGFrame; // A frame within a DBG packet - - DBGPacket = new PHPDBGPacket (PHPDBGBase.DBGA_REQUEST); // A request for DBG - DBGFrame = new PHPDBGFrame (PHPDBGBase.FRAME_VER); // We want the version of DBG - - DBGPacket.addFrame (DBGFrame); // Add the 'what we want' to the DBG packet - - if (proxy.getSocket ().isClosed ()) { // Can we communiate with DBG? - return; // No - } - - DBGPacket.sendPacket (os); // Send the request to DBG - } +// public void requestDBGVersion () throws IOException { +// PHPDBGPacket DBGPacket; // A DBG message packet +// PHPDBGFrame DBGFrame; // A frame within a DBG packet +// +// DBGPacket = new PHPDBGPacket (PHPDBGBase.DBGA_REQUEST); // A request for DBG +// DBGFrame = new PHPDBGFrame (PHPDBGBase.FRAME_VER); // We want the version of DBG +// +// DBGPacket.addFrame (DBGFrame); // Add the 'what we want' to the DBG packet +// +// if (proxy.getSocket ().isClosed ()) { // Can we communiate with DBG? +// return; // No +// } +// +// DBGPacket.sendPacket (os); // Send the request to DBG +// } /** * Called by the proxy @@ -140,27 +140,27 @@ public class PHPDBGInterface { * * @param modName The modul (filename). */ - public void addDBGModName (String modName) throws IOException { - PHPDBGPacket DBGPacket; // A DBG message packet - PHPDBGFrame DBGFrame; // A frame within a DBG packet - - DBGPacket = new PHPDBGPacket (PHPDBGBase.DBGA_REQUEST); // A request for DBG - DBGFrame = new PHPDBGFrame (PHPDBGBase.FRAME_RAWDATA); // We want Module name from DBG - - rawCounter++; // Increment the rawData ID counter - DBGFrame.addInt (rawCounter); // FRAME_RAWDATA ID - DBGFrame.addInt (modName.length () + 1); // The length of rawdata string (incl. null char termination) - DBGFrame.addString (modName); // The file name (module name) - DBGFrame.addChar ('\0'); // Add the C-String null termination - - DBGPacket.addFrame (DBGFrame); - - if (proxy.getSocket ().isClosed ()) { // Can we communiate with DBG? - return; // No - } - - DBGPacket.sendPacket (os); - } +// public void addDBGModName (String modName) throws IOException { +// PHPDBGPacket DBGPacket; // A DBG message packet +// PHPDBGFrame DBGFrame; // A frame within a DBG packet +// +// DBGPacket = new PHPDBGPacket (PHPDBGBase.DBGA_REQUEST); // A request for DBG +// DBGFrame = new PHPDBGFrame (PHPDBGBase.FRAME_RAWDATA); // We want Module name from DBG +// +// rawCounter++; // Increment the rawData ID counter +// DBGFrame.addInt (rawCounter); // FRAME_RAWDATA ID +// DBGFrame.addInt (modName.length () + 1); // The length of rawdata string (incl. null char termination) +// DBGFrame.addString (modName); // The file name (module name) +// DBGFrame.addChar ('\0'); // Add the C-String null termination +// +// DBGPacket.addFrame (DBGFrame); +// +// if (proxy.getSocket ().isClosed ()) { // Can we communiate with DBG? +// return; // No +// } +// +// DBGPacket.sendPacket (os); +// } /** * This method is called for adding or removing breakpoints. @@ -326,10 +326,10 @@ public class PHPDBGInterface { return BPUnder; } - public int getLastCmd() - { - return lastCmd; - } +// public int getLastCmd() +// { +// return lastCmd; +// } public int getSID() { @@ -338,7 +338,7 @@ public class PHPDBGInterface { public void setLastCmd (int cmd) { - lastCmd = cmd; + //lastCmd = cmd; } /** @@ -398,18 +398,18 @@ public class PHPDBGInterface { /** * */ - public void stopExecution () throws IOException { - PHPDBGPacket DBGPacket; - - BPUnderHit = 0; - DBGPacket = new PHPDBGPacket (PHPDBGBase.DBGA_STOP); - - if (proxy.getSocket ().isClosed ()) { // Can we communiate with DBG? - return; // No - } - - DBGPacket.sendPacket (os); // Send the request to DBG - } +// public void stopExecution () throws IOException { +// PHPDBGPacket DBGPacket; +// +// BPUnderHit = 0; +// DBGPacket = new PHPDBGPacket (PHPDBGBase.DBGA_STOP); +// +// if (proxy.getSocket ().isClosed ()) { // Can we communiate with DBG? +// return; // No +// } +// +// DBGPacket.sendPacket (os); // Send the request to DBG +// } /** * This method is called by the proxy. diff --git a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGMod.java b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGMod.java index b393a07..bbc8be6 100644 --- a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGMod.java +++ b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGMod.java @@ -15,8 +15,8 @@ public class PHPDBGMod { private String modName; - public PHPDBGMod() { - } +// public PHPDBGMod() { +// } public PHPDBGMod(int modNo, String modName) { this.modNo = modNo; @@ -31,9 +31,9 @@ public class PHPDBGMod { return modName; } - public void setNo(int modNo) { - this.modNo = modNo; - } +// public void setNo(int modNo) { +// this.modNo = modNo; +// } public void setName(String modName) { this.modName = modName; diff --git a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGProxy.java b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGProxy.java index 388ddc9..192cff0 100644 --- a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGProxy.java +++ b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGProxy.java @@ -38,7 +38,7 @@ import org.eclipse.debug.core.model.IBreakpoint; public class PHPDBGProxy { private ServerSocket server = null; - private BufferedReader reader = null; + //private BufferedReader reader = null; private PHPDBGInterface DBGInt = null; // The DBG interface which is linked with the proxy private PHPDebugTarget debugTarget = null; private PHPDBGProxy thisProxy = null; @@ -62,9 +62,9 @@ public class PHPDBGProxy { * Clean up the view, but leave the Debug session running. * added by ed_mann */ - public void updateView(){ - getDebugTarget().updateThreads(PHPMainThread); - } +// public void updateView(){ +// getDebugTarget().updateThreads(PHPMainThread); +// } /** * @param remote @@ -126,13 +126,13 @@ public class PHPDBGProxy { * * @return A server socket */ - protected ServerSocket getServerSocket () throws IOException { - if (server == null) { // Do we have already a server socket - createServerSocket (); // No, then create one - } - - return server; // Return the server socket - } +// protected ServerSocket getServerSocket () throws IOException { +// if (server == null) { // Do we have already a server socket +// createServerSocket (); // No, then create one +// } +// +// return server; // Return the server socket +// } /** * Find a free unused port between 10001 and 10101 if the current debug session @@ -183,9 +183,9 @@ public class PHPDBGProxy { * * @paran DBGInt The DGB interface which is linked with this proxy */ - protected void setDBGInterface (PHPDBGInterface DBGInt) { - this.DBGInt = DBGInt; - } +// protected void setDBGInterface (PHPDBGInterface DBGInt) { +// this.DBGInt = DBGInt; +// } /** * Get the DBG interface which is linked to this proxy @@ -200,14 +200,14 @@ public class PHPDBGProxy { * Give back a buffered input stream for the socket which is * linked with this proxy */ - public BufferedReader getReader () throws IOException { - if (reader == null) { // Do we already have a buffered input stream - reader = new BufferedReader (new InputStreamReader (this.getSocket ().getInputStream (), - "ISO8859_1")); - } - - return reader; // Return the buffered input stream - } +// public BufferedReader getReader () throws IOException { +// if (reader == null) { // Do we already have a buffered input stream +// reader = new BufferedReader (new InputStreamReader (this.getSocket ().getInputStream (), +// "ISO8859_1")); +// } +// +// return reader; // Return the buffered input stream +// } /** * @@ -386,9 +386,9 @@ public class PHPDBGProxy { /** * */ - public void phpLoopNotify () { - phpLoop.notifyWait (); - } +// public void phpLoopNotify () { +// phpLoop.notifyWait (); +// } /** * diff --git a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDebugCorePlugin.java b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDebugCorePlugin.java index 8e080dd..f2c34da 100644 --- a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDebugCorePlugin.java +++ b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDebugCorePlugin.java @@ -8,7 +8,7 @@ import net.sourceforge.phpeclipse.PHPeclipsePlugin; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; -import org.eclipse.swt.widgets.Shell; +//import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.plugin.AbstractUIPlugin; @@ -27,9 +27,9 @@ public class PHPDebugCorePlugin extends AbstractUIPlugin { return getDefault().internalGetActivePage(); } - public static Shell getActiveWorkbenchShell() { - return getActiveWorkbenchWindow().getShell(); - } +// public static Shell getActiveWorkbenchShell() { +// return getActiveWorkbenchWindow().getShell(); +// } public static IWorkbenchWindow getActiveWorkbenchWindow() { return getDefault().getWorkbench().getActiveWorkbenchWindow(); @@ -42,10 +42,10 @@ public class PHPDebugCorePlugin extends AbstractUIPlugin { return plugin; } - public static String getFormattedMessage(String key, String arg) { - String text = getResourceString(key); - return java.text.MessageFormat.format(text, new Object[] { arg }); - } +// public static String getFormattedMessage(String key, String arg) { +// String text = getResourceString(key); +// return java.text.MessageFormat.format(text, new Object[] { arg }); +// } public static String getResourceString(String key) { ResourceBundle bundle = plugin.getResourceBundle(); @@ -95,16 +95,16 @@ public class PHPDebugCorePlugin extends AbstractUIPlugin { /** * The constructor. */ - public PHPDebugCorePlugin() { - super(); - plugin = this; - try { - resourceBundle = ResourceBundle - .getBundle("net.sourceforge.phpdt.internal.debug.core.debugresources"); //$NON-NLS-1$ - } catch (MissingResourceException x) { - resourceBundle = null; - } - } +// public PHPDebugCorePlugin() { +// super(); +// plugin = this; +// try { +// resourceBundle = ResourceBundle +// .getBundle("net.sourceforge.phpdt.internal.debug.core.debugresources"); //$NON-NLS-1$ +// } catch (MissingResourceException x) { +// resourceBundle = null; +// } +// } public java.util.ResourceBundle getResourceBundle() { return resourceBundle; diff --git a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDegugCorePluginImages.java b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDegugCorePluginImages.java index cb042db..9d883d8 100644 --- a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDegugCorePluginImages.java +++ b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDegugCorePluginImages.java @@ -195,9 +195,9 @@ public class PHPDegugCorePluginImages { return url; } - public static Image manage(String key, ImageDescriptor desc) { - Image image = desc.createImage(); - PLUGIN_REGISTRY.put(key, image); - return image; - } +// public static Image manage(String key, ImageDescriptor desc) { +// Image image = desc.createImage(); +// PLUGIN_REGISTRY.put(key, image); +// return image; +// } } -- 1.7.1