Refactory: remove unused classes, imports, fields and methods.
authorincastrix <incastrix>
Wed, 23 Dec 2009 17:25:37 +0000 (17:25 +0000)
committerincastrix <incastrix>
Wed, 23 Dec 2009 17:25:37 +0000 (17:25 +0000)
14 files changed:
net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/internal/model/ExternalToolsModelMessages.java
net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/internal/model/ToolMessages.java [deleted file]
net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/internal/model/VariableContextManager.java
net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/internal/registry/ExternalToolMigration.java
net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/internal/registry/PathLocationVariableRegistry.java
net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/internal/ui/FileSelectionDialog.java
net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/internal/ui/MessageDialogWithToggle.java
net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/internal/ui/StatusInfo.java
net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/internal/ui/TreeAndListGroup.java
net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/launchConfigurations/ExternalToolsUtil.java
net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/model/StringMatcher.java
net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/preferences/PHPPreferencesMessages.java
net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpeclipse/externaltools/ExternalToolsPlugin.java
net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpeclipse/externaltools/PHPConsole.java

index e234173..05c322e 100644 (file)
@@ -58,7 +58,7 @@ public final class ExternalToolsModelMessages {
        /**
         * Returns the resource bundle for the plug-in
         */
-       public static ResourceBundle getResourceBundle() {
-               return bundle;
-       }
+//     public static ResourceBundle getResourceBundle() {
+//             return bundle;
+//     }
 }
diff --git a/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/internal/model/ToolMessages.java b/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/internal/model/ToolMessages.java
deleted file mode 100644 (file)
index d0cfc96..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-package net.sourceforge.phpdt.externaltools.internal.model;
-
-/**********************************************************************
- Copyright (c) 2002 IBM Corp. and others. All rights reserved.
- This file is made available under the terms of the Common Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/cpl-v10.html
- �
- Contributors:
- **********************************************************************/
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Utility class which helps managing messages
- */
-public final class ToolMessages {
-       private static final String RESOURCE_BUNDLE = "net.sourceforge.phpdt.externaltools.internal.model.messages"; //$NON-NLS-1$
-
-       private static ResourceBundle bundle = ResourceBundle
-                       .getBundle(RESOURCE_BUNDLE);
-
-       private ToolMessages() {
-               // prevent instantiation of class
-       }
-
-       /**
-        * Returns the formatted message for the given key in the resource bundle.
-        * 
-        * @param key
-        *            the message name
-        * @param args
-        *            the message arguments
-        * @return the formatted message
-        */
-       public static String format(String key, Object[] args) {
-               return MessageFormat.format(getString(key), args);
-       }
-
-       /**
-        * Returns the message with the given key in the resource bundle. If there
-        * isn't any value under the given key, the key is returned.
-        * 
-        * @param key
-        *            the message name
-        * @return the message
-        */
-       public static String getString(String key) {
-               try {
-                       return bundle.getString(key);
-               } catch (MissingResourceException e) {
-                       return key;
-               }
-       }
-
-       /**
-        * Returns the resource bundle for the plug-in
-        */
-       public static ResourceBundle getResourceBundle() {
-               return bundle;
-       }
-}
index c604f13..93127ad 100644 (file)
@@ -7,14 +7,14 @@ package net.sourceforge.phpdt.externaltools.internal.model;
  http://www.eclipse.org/legal/cpl-v10.html
  **********************************************************************/
 
-import java.util.Map;
+//import java.util.Map;
 
 import net.sourceforge.phpdt.externaltools.variable.ExpandVariableContext;
 
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
+//import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.IEditorInput;
@@ -27,7 +27,7 @@ import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder;
+//import org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder;
 
 /**
  * Maintains the context used to expand variables. The context is based on the
@@ -163,19 +163,19 @@ public class VariableContextManager implements IWindowListener,
         * @param kind
         * @see ExternalToolBuilder#build(int, Map, IProgressMonitor)
         */
-       public void buildStarted(IProject project, int kind) {
-               fBuilding = true;
-               fProject = project;
-               fKind = kind;
-       }
+//     public void buildStarted(IProject project, int kind) {
+//             fBuilding = true;
+//             fProject = project;
+//             fKind = kind;
+//     }
 
        /**
         * Notification the building the current project has completed.
         * 
         * @see ExternalToolBuilder#build(int, Map, IProgressMonitor)
         */
-       public void buildEnded() {
-               fBuilding = false;
-               fProject = null;
-       }
+//     public void buildEnded() {
+//             fBuilding = false;
+//             fProject = null;
+//     }
 }
index 0a4d892..2a47c79 100644 (file)
@@ -9,29 +9,29 @@ package net.sourceforge.phpdt.externaltools.internal.registry;
  Contributors:
  **********************************************************************/
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStreamReader;
+//import java.io.File;
+//import java.io.FileInputStream;
+//import java.io.FileNotFoundException;
+//import java.io.IOException;
+//import java.io.InputStreamReader;
 import java.util.ArrayList;
-import java.util.HashMap;
+//import java.util.HashMap;
 import java.util.Map;
 import java.util.StringTokenizer;
 
 import net.sourceforge.phpdt.externaltools.model.IExternalToolConstants;
 import net.sourceforge.phpdt.externaltools.model.ToolUtil;
-import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
+//import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
 
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
+//import org.eclipse.core.runtime.IPath;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunchConfigurationType;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.WorkbenchException;
-import org.eclipse.ui.XMLMemento;
+//import org.eclipse.ui.IMemento;
+//import org.eclipse.ui.WorkbenchException;
+//import org.eclipse.ui.XMLMemento;
 
 /**
  * Responsible reading an old external tool format and creating and migrating it
@@ -40,15 +40,15 @@ import org.eclipse.ui.XMLMemento;
 public final class ExternalToolMigration {
        //private static final String SEPERATOR = ";"; //$NON-NLS-1$    
 
-       private static final String STATE_FILE_NAME_OLD = "oldexternaltools.xml"; //$NON-NLS-1$
+       //private static final String STATE_FILE_NAME_OLD = "oldexternaltools.xml"; //$NON-NLS-1$
 
-       private static final String STATE_FILE_NAME = "externaltools.xml"; //$NON-NLS-1$
+       //private static final String STATE_FILE_NAME = "externaltools.xml"; //$NON-NLS-1$
 
        //private static final String TAG_EXTERNALTOOLS = "externaltools"; //$NON-NLS-1$
 
-       private static final String TAG_TOOL = "tool"; //$NON-NLS-1$
+       //private static final String TAG_TOOL = "tool"; //$NON-NLS-1$
 
-       private static final String TAG_ENTRY = "entry"; //$NON-NLS-1$
+       //private static final String TAG_ENTRY = "entry"; //$NON-NLS-1$
 
        // private static final String TAG_KEY = "key"; //$NON-NLS-1$
 //     private static final String TAG_VALUE = "value"; //$NON-NLS-1$
@@ -123,7 +123,7 @@ public final class ExternalToolMigration {
 
        private static final String TAG_EXTRA_ATTR = "extraAttribute"; //$NON-NLS-1$
 
-       private static final String TAG_KEY = "key"; //$NON-NLS-1$
+       //private static final String TAG_KEY = "key"; //$NON-NLS-1$
 
        private static final String TAG_VERSION = "version"; //$NON-NLS-1$
 
@@ -158,75 +158,75 @@ public final class ExternalToolMigration {
 //     private static void readIn21Tools() {
 //     }
 
-       public static void readIn20Tools() {
-               boolean migrationSuccessful = true;
-               IPath path = ExternalToolsPlugin.getDefault().getStateLocation();
-               File file = path.append(STATE_FILE_NAME).toFile();
-               if (!file.exists())
-                       return;
-
-               InputStreamReader reader = null;
-               try {
-                       FileInputStream input = new FileInputStream(file);
-                       reader = new InputStreamReader(input, "utf-8"); //$NON-NLS-1$
-                       XMLMemento memento = XMLMemento.createReadRoot(reader);
-
-                       // Get the external tool children element
-                       IMemento[] tools = memento.getChildren(TAG_TOOL);
-                       for (int i = 0; i < tools.length; i++) {
-                               HashMap args = new HashMap();
-                               IMemento[] entries = tools[i].getChildren(TAG_ENTRY);
-                               for (int j = 0; j < entries.length; j++) {
-                                       String key = entries[j].getString(TAG_KEY);
-                                       if (key != null) {
-                                               String value = entries[j].getTextData();
-                                               args.put(key, value);
-                                       }
-                               }
-                               ILaunchConfigurationWorkingCopy config = configFromArgumentMap(args);
-                               if (config != null) {
-                                       try {
-                                               config.doSave();
-                                       } catch (CoreException e) {
-                                               // TODO: Decide what to do when saving fails.
-                                       }
-                               }
-                       }
-               } catch (FileNotFoundException e) {
-                       // Silently ignore this...
-               } catch (IOException e) {
-                       ExternalToolsPlugin.getDefault().log(
-                                       "File I/O error with reading old external tools.", e);
-                       migrationSuccessful = false;
-               } catch (WorkbenchException e) {
-                       ExternalToolsPlugin.getDefault().getLog().log(e.getStatus());
-                       System.err
-                                       .println("Error reading old external tools. See .log file for more details");
-                       migrationSuccessful = false;
-               } finally {
-                       if (reader != null) {
-                               try {
-                                       reader.close();
-                               } catch (IOException e) {
-                                       ExternalToolsPlugin.getDefault().log(
-                                                       "Unable to close external tool old state reader.",
-                                                       e);
-                               }
-                       }
-               }
-
-               if (migrationSuccessful) {
-                       if (!file.renameTo(path.append(STATE_FILE_NAME_OLD).toFile())) {
-                               ExternalToolsPlugin
-                                               .getDefault()
-                                               .log(
-                                                               "Unable to rename old external tool state file. Please rename externaltools.xml to oldexternaltools.xml manually.",
-                                                               null);
-                               System.err
-                                               .println("Unable to rename old external tool state file. Please rename externaltools.xml to oldexternaltools.xml manually.");
-                       }
-               }
-       }
+//     public static void readIn20Tools() {
+//             boolean migrationSuccessful = true;
+//             IPath path = ExternalToolsPlugin.getDefault().getStateLocation();
+//             File file = path.append(STATE_FILE_NAME).toFile();
+//             if (!file.exists())
+//                     return;
+//
+//             InputStreamReader reader = null;
+//             try {
+//                     FileInputStream input = new FileInputStream(file);
+//                     reader = new InputStreamReader(input, "utf-8"); //$NON-NLS-1$
+//                     XMLMemento memento = XMLMemento.createReadRoot(reader);
+//
+//                     // Get the external tool children element
+//                     IMemento[] tools = memento.getChildren(TAG_TOOL);
+//                     for (int i = 0; i < tools.length; i++) {
+//                             HashMap args = new HashMap();
+//                             IMemento[] entries = tools[i].getChildren(TAG_ENTRY);
+//                             for (int j = 0; j < entries.length; j++) {
+//                                     String key = entries[j].getString(TAG_KEY);
+//                                     if (key != null) {
+//                                             String value = entries[j].getTextData();
+//                                             args.put(key, value);
+//                                     }
+//                             }
+//                             ILaunchConfigurationWorkingCopy config = configFromArgumentMap(args);
+//                             if (config != null) {
+//                                     try {
+//                                             config.doSave();
+//                                     } catch (CoreException e) {
+//                                             // TODO: Decide what to do when saving fails.
+//                                     }
+//                             }
+//                     }
+//             } catch (FileNotFoundException e) {
+//                     // Silently ignore this...
+//             } catch (IOException e) {
+//                     ExternalToolsPlugin.getDefault().log(
+//                                     "File I/O error with reading old external tools.", e);
+//                     migrationSuccessful = false;
+//             } catch (WorkbenchException e) {
+//                     ExternalToolsPlugin.getDefault().getLog().log(e.getStatus());
+//                     System.err
+//                                     .println("Error reading old external tools. See .log file for more details");
+//                     migrationSuccessful = false;
+//             } finally {
+//                     if (reader != null) {
+//                             try {
+//                                     reader.close();
+//                             } catch (IOException e) {
+//                                     ExternalToolsPlugin.getDefault().log(
+//                                                     "Unable to close external tool old state reader.",
+//                                                     e);
+//                             }
+//                     }
+//             }
+//
+//             if (migrationSuccessful) {
+//                     if (!file.renameTo(path.append(STATE_FILE_NAME_OLD).toFile())) {
+//                             ExternalToolsPlugin
+//                                             .getDefault()
+//                                             .log(
+//                                                             "Unable to rename old external tool state file. Please rename externaltools.xml to oldexternaltools.xml manually.",
+//                                                             null);
+//                             System.err
+//                                             .println("Unable to rename old external tool state file. Please rename externaltools.xml to oldexternaltools.xml manually.");
+//                     }
+//             }
+//     }
 
        /**
         * Returns a launch configuration working copy from the argument map or
@@ -426,12 +426,12 @@ public final class ExternalToolMigration {
         * Returns the tool name extracted from the given command argument map.
         * Extraction is attempted using 2.0 and 2.1 external tool formats.
         */
-       public static String getNameFromCommandArgs(Map commandArgs) {
-               String name = (String) commandArgs.get(TAG_NAME);
-               if (name == null) {
-                       name = (String) commandArgs.get(TAG_TOOL_NAME);
-               }
-               return name;
-       }
+//     public static String getNameFromCommandArgs(Map commandArgs) {
+//             String name = (String) commandArgs.get(TAG_NAME);
+//             if (name == null) {
+//                     name = (String) commandArgs.get(TAG_TOOL_NAME);
+//             }
+//             return name;
+//     }
 
 }
index 70fc909..b0a8f17 100644 (file)
@@ -34,11 +34,11 @@ public class PathLocationVariableRegistry extends ExternalToolVariableRegistry {
        /**
         * Returns the list of path location variables in the registry.
         */
-       public PathLocationVariable[] getPathLocationVariables() {
-               PathLocationVariable[] results = new PathLocationVariable[getVariableCount()];
-               copyVariables(results);
-               return results;
-       }
+//     public PathLocationVariable[] getPathLocationVariables() {
+//             PathLocationVariable[] results = new PathLocationVariable[getVariableCount()];
+//             copyVariables(results);
+//             return results;
+//     }
 
        /*
         * (non-Javadoc) Method declared on ExternalToolVariableRegistry.
index 26f7b68..98a844e 100644 (file)
@@ -84,13 +84,13 @@ public class FileSelectionDialog extends MessageDialog {
         *            if true, case is ignored. If the pattern argument is
         *            <code>null</code>, this argument is ignored.
         */
-       public void setFileFilter(String pattern, boolean ignoreCase) {
-               if (pattern != null) {
-                       stringMatcher = new StringMatcher(pattern, ignoreCase, false);
-               } else {
-                       stringMatcher = null;
-               }
-       }
+//     public void setFileFilter(String pattern, boolean ignoreCase) {
+//             if (pattern != null) {
+//                     stringMatcher = new StringMatcher(pattern, ignoreCase, false);
+//             } else {
+//                     stringMatcher = null;
+//             }
+//     }
 
        /*
         * (non-Javadoc) Method declared in Window.
index 1e3e84f..f5d04a8 100644 (file)
@@ -119,16 +119,16 @@ public class MessageDialogWithToggle extends MessageDialog {
         * @return <code>true</code> if the user presses the OK button,
         *         <code>false</code> otherwise
         */
-       public static boolean openConfirm(Shell parent, String title,
-                       String message, String preferenceKey, String toggleMessage,
-                       IPreferenceStore store) {
-               MessageDialogWithToggle dialog = new MessageDialogWithToggle(parent,
-                               title, null, // accept the default window icon
-                               message, QUESTION, new String[] { IDialogConstants.OK_LABEL,
-                                               IDialogConstants.CANCEL_LABEL }, 0, // OK is the default
-                               preferenceKey, toggleMessage, store);
-               return dialog.open() == 0;
-       }
+//     public static boolean openConfirm(Shell parent, String title,
+//                     String message, String preferenceKey, String toggleMessage,
+//                     IPreferenceStore store) {
+//             MessageDialogWithToggle dialog = new MessageDialogWithToggle(parent,
+//                             title, null, // accept the default window icon
+//                             message, QUESTION, new String[] { IDialogConstants.OK_LABEL,
+//                                             IDialogConstants.CANCEL_LABEL }, 0, // OK is the default
+//                             preferenceKey, toggleMessage, store);
+//             return dialog.open() == 0;
+//     }
 
        /**
         * Convenience method to open a standard error dialog.
@@ -140,17 +140,17 @@ public class MessageDialogWithToggle extends MessageDialog {
         * @param message
         *            the message
         */
-       public static void openError(Shell parent, String title, String message,
-                       String preferenceKey, String toggleMessage, IPreferenceStore store) {
-               MessageDialogWithToggle dialog = new MessageDialogWithToggle(parent,
-                               title, null, // accept the default window icon
-                               message, ERROR, new String[] { IDialogConstants.OK_LABEL }, 0, // ok
-                                                                                                                                                               // is
-                                                                                                                                                               // the
-                                                                                                                                                               // default
-                               preferenceKey, toggleMessage, store);
-               dialog.open();
-       }
+//     public static void openError(Shell parent, String title, String message,
+//                     String preferenceKey, String toggleMessage, IPreferenceStore store) {
+//             MessageDialogWithToggle dialog = new MessageDialogWithToggle(parent,
+//                             title, null, // accept the default window icon
+//                             message, ERROR, new String[] { IDialogConstants.OK_LABEL }, 0, // ok
+//                                                                                                                                                             // is
+//                                                                                                                                                             // the
+//                                                                                                                                                             // default
+//                             preferenceKey, toggleMessage, store);
+//             dialog.open();
+//     }
 
        /**
         * Convenience method to open a standard information dialog.
@@ -162,18 +162,18 @@ public class MessageDialogWithToggle extends MessageDialog {
         * @param message
         *            the message
         */
-       public static void openInformation(Shell parent, String title,
-                       String message, String preferenceKey, String toggleMessage,
-                       IPreferenceStore store) {
-               MessageDialogWithToggle dialog = new MessageDialogWithToggle(parent,
-                               title,
-                               null, // accept the default window icon
-                               message, INFORMATION,
-                               new String[] { IDialogConstants.OK_LABEL }, 0, // ok is the
-                                                                                                                               // default
-                               preferenceKey, toggleMessage, store);
-               dialog.open();
-       }
+//     public static void openInformation(Shell parent, String title,
+//                     String message, String preferenceKey, String toggleMessage,
+//                     IPreferenceStore store) {
+//             MessageDialogWithToggle dialog = new MessageDialogWithToggle(parent,
+//                             title,
+//                             null, // accept the default window icon
+//                             message, INFORMATION,
+//                             new String[] { IDialogConstants.OK_LABEL }, 0, // ok is the
+//                                                                                                                             // default
+//                             preferenceKey, toggleMessage, store);
+//             dialog.open();
+//     }
 
        /**
         * Convenience method to open a simple Yes/No question dialog.
@@ -187,16 +187,16 @@ public class MessageDialogWithToggle extends MessageDialog {
         * @return <code>true</code> if the user presses the OK button,
         *         <code>false</code> otherwise
         */
-       public static boolean openQuestion(Shell parent, String title,
-                       String message, String preferenceKey, String toggleMessage,
-                       IPreferenceStore store) {
-               MessageDialogWithToggle dialog = new MessageDialogWithToggle(parent,
-                               title, null, // accept the default window icon
-                               message, QUESTION, new String[] { IDialogConstants.YES_LABEL,
-                                               IDialogConstants.NO_LABEL }, 0, // yes is the default
-                               preferenceKey, toggleMessage, store);
-               return dialog.open() == 0;
-       }
+//     public static boolean openQuestion(Shell parent, String title,
+//                     String message, String preferenceKey, String toggleMessage,
+//                     IPreferenceStore store) {
+//             MessageDialogWithToggle dialog = new MessageDialogWithToggle(parent,
+//                             title, null, // accept the default window icon
+//                             message, QUESTION, new String[] { IDialogConstants.YES_LABEL,
+//                                             IDialogConstants.NO_LABEL }, 0, // yes is the default
+//                             preferenceKey, toggleMessage, store);
+//             return dialog.open() == 0;
+//     }
 
        /**
         * Convenience method to open a standard warning dialog.
@@ -208,15 +208,15 @@ public class MessageDialogWithToggle extends MessageDialog {
         * @param message
         *            the message
         */
-       public static void openWarning(Shell parent, String title, String message,
-                       String preferenceKey, String toggleMessage, IPreferenceStore store) {
-               MessageDialogWithToggle dialog = new MessageDialogWithToggle(parent,
-                               title,
-                               null, // accept the default window icon
-                               message, WARNING, new String[] { IDialogConstants.OK_LABEL },
-                               0, // ok is the default
-                               preferenceKey, toggleMessage, store);
-               dialog.open();
-       }
+//     public static void openWarning(Shell parent, String title, String message,
+//                     String preferenceKey, String toggleMessage, IPreferenceStore store) {
+//             MessageDialogWithToggle dialog = new MessageDialogWithToggle(parent,
+//                             title,
+//                             null, // accept the default window icon
+//                             message, WARNING, new String[] { IDialogConstants.OK_LABEL },
+//                             0, // ok is the default
+//                             preferenceKey, toggleMessage, store);
+//             dialog.open();
+//     }
 
 }
index 16c9e61..177faba 100644 (file)
@@ -55,23 +55,23 @@ public class StatusInfo implements IStatus {
        /**
         * Returns if the status' severity is WARNING.
         */
-       public boolean isWarning() {
-               return fSeverity == IStatus.WARNING;
-       }
+//     public boolean isWarning() {
+//             return fSeverity == IStatus.WARNING;
+//     }
 
        /**
         * Returns if the status' severity is INFO.
         */
-       public boolean isInfo() {
-               return fSeverity == IStatus.INFO;
-       }
+//     public boolean isInfo() {
+//             return fSeverity == IStatus.INFO;
+//     }
 
        /**
         * Returns if the status' severity is ERROR.
         */
-       public boolean isError() {
-               return fSeverity == IStatus.ERROR;
-       }
+//     public boolean isError() {
+//             return fSeverity == IStatus.ERROR;
+//     }
 
        /**
         * @see IStatus#getMessage
@@ -98,11 +98,11 @@ public class StatusInfo implements IStatus {
         * @param The
         *            warning message (can be empty, but not null)
         */
-       public void setWarning(String warningMessage) {
-               Assert.isNotNull(warningMessage);
-               fStatusMessage = warningMessage;
-               fSeverity = IStatus.WARNING;
-       }
+//     public void setWarning(String warningMessage) {
+//             Assert.isNotNull(warningMessage);
+//             fStatusMessage = warningMessage;
+//             fSeverity = IStatus.WARNING;
+//     }
 
        /**
         * Sets the status to INFO.
@@ -110,19 +110,19 @@ public class StatusInfo implements IStatus {
         * @param The
         *            info message (can be empty, but not null)
         */
-       public void setInfo(String infoMessage) {
-               Assert.isNotNull(infoMessage);
-               fStatusMessage = infoMessage;
-               fSeverity = IStatus.INFO;
-       }
+//     public void setInfo(String infoMessage) {
+//             Assert.isNotNull(infoMessage);
+//             fStatusMessage = infoMessage;
+//             fSeverity = IStatus.INFO;
+//     }
 
        /**
         * Sets the status to OK.
         */
-       public void setOK() {
-               fStatusMessage = null;
-               fSeverity = IStatus.OK;
-       }
+//     public void setOK() {
+//             fStatusMessage = null;
+//             fSeverity = IStatus.OK;
+//     }
 
        /*
         * @see IStatus#matches(int)
index 1255b2f..1376806 100644 (file)
@@ -21,7 +21,7 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.ViewerSorter;
+//import org.eclipse.jface.viewers.ViewerSorter;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
@@ -95,17 +95,17 @@ public class TreeAndListGroup implements ISelectionChangedListener {
        /**
         * This method must be called just before this window becomes visible.
         */
-       public void aboutToOpen() {
-               currentTreeSelection = null;
-
-               // select the first element in the list
-               Object[] elements = treeContentProvider.getElements(root);
-               Object primary = elements.length > 0 ? elements[0] : null;
-               if (primary != null) {
-                       treeViewer.setSelection(new StructuredSelection(primary));
-               }
-               treeViewer.getControl().setFocus();
-       }
+//     public void aboutToOpen() {
+//             currentTreeSelection = null;
+//
+//             // select the first element in the list
+//             Object[] elements = treeContentProvider.getElements(root);
+//             Object primary = elements.length > 0 ? elements[0] : null;
+//             if (primary != null) {
+//                     treeViewer.setSelection(new StructuredSelection(primary));
+//             }
+//             treeViewer.getControl().setFocus();
+//     }
 
        /**
         * Add the passed listener to collection of clients that listen for changes
@@ -214,22 +214,22 @@ public class TreeAndListGroup implements ISelectionChangedListener {
                }
        }
 
-       protected void initialListItem(Object element) {
-               Object parent = treeContentProvider.getParent(element);
-               selectAndRevealFolder(parent);
-       }
+//     protected void initialListItem(Object element) {
+//             Object parent = treeContentProvider.getParent(element);
+//             selectAndRevealFolder(parent);
+//     }
 
-       public void selectAndRevealFolder(Object treeElement) {
-               treeViewer.reveal(treeElement);
-               IStructuredSelection selection = new StructuredSelection(treeElement);
-               treeViewer.setSelection(selection);
-       }
+//     public void selectAndRevealFolder(Object treeElement) {
+//             treeViewer.reveal(treeElement);
+//             IStructuredSelection selection = new StructuredSelection(treeElement);
+//             treeViewer.setSelection(selection);
+//     }
 
-       public void selectAndRevealFile(Object treeElement) {
-               listViewer.reveal(treeElement);
-               IStructuredSelection selection = new StructuredSelection(treeElement);
-               listViewer.setSelection(selection);
-       }
+//     public void selectAndRevealFile(Object treeElement) {
+//             listViewer.reveal(treeElement);
+//             IStructuredSelection selection = new StructuredSelection(treeElement);
+//             listViewer.setSelection(selection);
+//     }
 
        /**
         * Initialize this group's viewers after they have been laid out.
@@ -270,18 +270,18 @@ public class TreeAndListGroup implements ISelectionChangedListener {
         * @param labelProvider
         *            ILabelProvider
         */
-       public void setListProviders(IStructuredContentProvider contentProvider,
-                       ILabelProvider labelProvider) {
-               listViewer.setContentProvider(contentProvider);
-               listViewer.setLabelProvider(labelProvider);
-       }
+//     public void setListProviders(IStructuredContentProvider contentProvider,
+//                     ILabelProvider labelProvider) {
+//             listViewer.setContentProvider(contentProvider);
+//             listViewer.setLabelProvider(labelProvider);
+//     }
 
        /**
         * Set the sorter that is to be applied to self's list viewer
         */
-       public void setListSorter(ViewerSorter sorter) {
-               listViewer.setSorter(sorter);
-       }
+//     public void setListSorter(ViewerSorter sorter) {
+//             listViewer.setSorter(sorter);
+//     }
 
        /**
         * Set the root of the widget to be new Root. Regenerate all of the tables
@@ -289,10 +289,10 @@ public class TreeAndListGroup implements ISelectionChangedListener {
         * 
         * @param newRoot
         */
-       public void setRoot(Object newRoot) {
-               this.root = newRoot;
-               initialize();
-       }
+//     public void setRoot(Object newRoot) {
+//             this.root = newRoot;
+//             initialize();
+//     }
 
        /**
         * Set the tree viewer's providers to those passed
@@ -302,29 +302,29 @@ public class TreeAndListGroup implements ISelectionChangedListener {
         * @param labelProvider
         *            ILabelProvider
         */
-       public void setTreeProviders(ITreeContentProvider contentProvider,
-                       ILabelProvider labelProvider) {
-               treeViewer.setContentProvider(contentProvider);
-               treeViewer.setLabelProvider(labelProvider);
-       }
+//     public void setTreeProviders(ITreeContentProvider contentProvider,
+//                     ILabelProvider labelProvider) {
+//             treeViewer.setContentProvider(contentProvider);
+//             treeViewer.setLabelProvider(labelProvider);
+//     }
 
        /**
         * Set the sorter that is to be applied to self's tree viewer
         */
-       public void setTreeSorter(ViewerSorter sorter) {
-               treeViewer.setSorter(sorter);
-       }
+//     public void setTreeSorter(ViewerSorter sorter) {
+//             treeViewer.setSorter(sorter);
+//     }
 
        /**
         * Set the focus on to the list widget.
         */
-       public void setFocus() {
-
-               this.treeViewer.getTree().setFocus();
-       }
-
-       public void setAllowMultiselection(boolean allowMultiselection) {
-               this.allowMultiselection = allowMultiselection;
-
-       }
+//     public void setFocus() {
+//
+//             this.treeViewer.getTree().setFocus();
+//     }
+
+//     public void setAllowMultiselection(boolean allowMultiselection) {
+//             this.allowMultiselection = allowMultiselection;
+//
+//     }
 }
index 50fd0c0..d666703 100644 (file)
@@ -11,11 +11,11 @@ package net.sourceforge.phpdt.externaltools.launchConfigurations;
 
 import java.io.File;
 import java.text.MessageFormat;
-import java.util.Map;
+//import java.util.Map;
 
 import net.sourceforge.phpdt.externaltools.internal.model.ExternalToolsModelMessages;
 import net.sourceforge.phpdt.externaltools.internal.model.VariableContextManager;
-import net.sourceforge.phpdt.externaltools.internal.registry.ExternalToolMigration;
+//import net.sourceforge.phpdt.externaltools.internal.registry.ExternalToolMigration;
 import net.sourceforge.phpdt.externaltools.internal.registry.RefreshScopeVariable;
 import net.sourceforge.phpdt.externaltools.internal.registry.RefreshScopeVariableRegistry;
 import net.sourceforge.phpdt.externaltools.model.IExternalToolConstants;
@@ -48,7 +48,7 @@ import org.eclipse.debug.core.ILaunchManager;
  */
 public class ExternalToolsUtil {
 
-       private static final String LAUNCH_CONFIG_HANDLE = "LaunchConfigHandle"; //$NON-NLS-1$
+       //private static final String LAUNCH_CONFIG_HANDLE = "LaunchConfigHandle"; //$NON-NLS-1$
 
        /**
         * Not to be instantiated.
@@ -366,20 +366,20 @@ public class ExternalToolsUtil {
         * @return a launch configuration, a launch configuration working copy, or
         *         <code>null</code> if not possible.
         */
-       public static ILaunchConfiguration configFromBuildCommandArgs(
-                       Map commandArgs) {
-               String configHandle = (String) commandArgs.get(LAUNCH_CONFIG_HANDLE);
-               if (configHandle == null) {
-                       // Probably an old-style external tool. Try to migrate.
-                       return ExternalToolMigration.configFromArgumentMap(commandArgs);
-               }
-               try {
-                       return DebugPlugin.getDefault().getLaunchManager()
-                                       .getLaunchConfiguration(configHandle);
-               } catch (CoreException e) {
-                       return null;
-               }
-       }
+//     public static ILaunchConfiguration configFromBuildCommandArgs(
+//                     Map commandArgs) {
+//             String configHandle = (String) commandArgs.get(LAUNCH_CONFIG_HANDLE);
+//             if (configHandle == null) {
+//                     // Probably an old-style external tool. Try to migrate.
+//                     return ExternalToolMigration.configFromArgumentMap(commandArgs);
+//             }
+//             try {
+//                     return DebugPlugin.getDefault().getLaunchManager()
+//                                     .getLaunchConfiguration(configHandle);
+//             } catch (CoreException e) {
+//                     return null;
+//             }
+//     }
 
        /**
         * Executes an external progam and saves the LaunchConfiguration under
index 797be51..e264301 100644 (file)
@@ -77,21 +77,21 @@ public class StringMatcher {
         *            if true, wild cards and their escape sequences are ignored
         *            (everything is taken literally).
         */
-       public StringMatcher(String pattern, boolean ignoreCase,
-                       boolean ignoreWildCards) {
-               if (pattern == null)
-                       throw new IllegalArgumentException();
-               fIgnoreCase = ignoreCase;
-               fIgnoreWildCards = ignoreWildCards;
-               fPattern = pattern;
-               fLength = pattern.length();
-
-               if (fIgnoreWildCards) {
-                       parseNoWildCards();
-               } else {
-                       parseWildCards();
-               }
-       }
+//     public StringMatcher(String pattern, boolean ignoreCase,
+//                     boolean ignoreWildCards) {
+//             if (pattern == null)
+//                     throw new IllegalArgumentException();
+//             fIgnoreCase = ignoreCase;
+//             fIgnoreWildCards = ignoreWildCards;
+//             fPattern = pattern;
+//             fLength = pattern.length();
+//
+//             if (fIgnoreWildCards) {
+//                     parseNoWildCards();
+//             } else {
+//                     parseWildCards();
+//             }
+//     }
 
        /**
         * Find the first occurrence of the pattern between
@@ -107,46 +107,46 @@ public class StringMatcher {
         * Note that for pattern like "*abc*" with leading and trailing stars, position of "abc"
         * is returned. For a pattern like"*??*" in text "abcdf", (1,3) is returned
         */
-       public StringMatcher.Position find(String text, int start, int end) {
-               if (text == null)
-                       throw new IllegalArgumentException();
-
-               int tlen = text.length();
-               if (start < 0)
-                       start = 0;
-               if (end > tlen)
-                       end = tlen;
-               if (end < 0 || start >= end)
-                       return null;
-               if (fLength == 0)
-                       return new Position(start, start);
-               if (fIgnoreWildCards) {
-                       int x = posIn(text, start, end);
-                       if (x < 0)
-                               return null;
-                       return new Position(x, x + fLength);
-               }
-
-               int segCount = fSegments.length;
-               if (segCount == 0)// pattern contains only '*'(s)
-                       return new Position(start, end);
-
-               int curPos = start;
-               int matchStart = -1;
-               int i;
-               for (i = 0; i < segCount && curPos < end; ++i) {
-                       String current = fSegments[i];
-                       int nextMatch = regExpPosIn(text, curPos, end, current);
-                       if (nextMatch < 0)
-                               return null;
-                       if (i == 0)
-                               matchStart = nextMatch;
-                       curPos = nextMatch + current.length();
-               }
-               if (i < segCount)
-                       return null;
-               return new Position(matchStart, curPos);
-       }
+//     public StringMatcher.Position find(String text, int start, int end) {
+//             if (text == null)
+//                     throw new IllegalArgumentException();
+//
+//             int tlen = text.length();
+//             if (start < 0)
+//                     start = 0;
+//             if (end > tlen)
+//                     end = tlen;
+//             if (end < 0 || start >= end)
+//                     return null;
+//             if (fLength == 0)
+//                     return new Position(start, start);
+//             if (fIgnoreWildCards) {
+//                     int x = posIn(text, start, end);
+//                     if (x < 0)
+//                             return null;
+//                     return new Position(x, x + fLength);
+//             }
+//
+//             int segCount = fSegments.length;
+//             if (segCount == 0)// pattern contains only '*'(s)
+//                     return new Position(start, end);
+//
+//             int curPos = start;
+//             int matchStart = -1;
+//             int i;
+//             for (i = 0; i < segCount && curPos < end; ++i) {
+//                     String current = fSegments[i];
+//                     int nextMatch = regExpPosIn(text, curPos, end, current);
+//                     if (nextMatch < 0)
+//                             return null;
+//                     if (i == 0)
+//                             matchStart = nextMatch;
+//                     curPos = nextMatch + current.length();
+//             }
+//             if (i < segCount)
+//                     return null;
+//             return new Position(matchStart, curPos);
+//     }
 
        /**
         * match the given <code>text</code> with the pattern
@@ -329,24 +329,24 @@ public class StringMatcher {
         * @return the starting index in the text of the pattern , or -1 if not
         *         found
         */
-       protected int posIn(String text, int start, int end) {// no wild card in
-                                                                                                                       // pattern
-               int max = end - fLength;
-
-               if (!fIgnoreCase) {
-                       int i = text.indexOf(fPattern, start);
-                       if (i == -1 || i > max)
-                               return -1;
-                       return i;
-               }
-
-               for (int i = start; i <= max; ++i) {
-                       if (text.regionMatches(true, i, fPattern, 0, fLength))
-                               return i;
-               }
-
-               return -1;
-       }
+//     protected int posIn(String text, int start, int end) {// no wild card in
+//                                                                                                                     // pattern
+//             int max = end - fLength;
+//
+//             if (!fIgnoreCase) {
+//                     int i = text.indexOf(fPattern, start);
+//                     if (i == -1 || i > max)
+//                             return -1;
+//                     return i;
+//             }
+//
+//             for (int i = start; i <= max; ++i) {
+//                     if (text.regionMatches(true, i, fPattern, 0, fLength))
+//                             return i;
+//             }
+//
+//             return -1;
+//     }
 
        /**
         * @param <code>text</code>, a simple regular expression that may only
index c1dbe52..0f77ff8 100644 (file)
@@ -1,6 +1,6 @@
 package net.sourceforge.phpdt.externaltools.preferences;
 
-import java.text.MessageFormat;
+//import java.text.MessageFormat;
 import java.util.MissingResourceException;
 import java.util.ResourceBundle;
 
@@ -29,14 +29,14 @@ public class PHPPreferencesMessages {
         * @param key
         *            the string used to get the bundle value, must not be null
         */
-       public static String getFormattedString(String key, Object arg) {
-               return MessageFormat.format(getString(key), new Object[] { arg });
-       }
+//     public static String getFormattedString(String key, Object arg) {
+//             return MessageFormat.format(getString(key), new Object[] { arg });
+//     }
 
        /**
         * Gets a string from the resource bundle and formats it with arguments
         */
-       public static String getFormattedString(String key, Object[] args) {
-               return MessageFormat.format(getString(key), args);
-       }
+//     public static String getFormattedString(String key, Object[] args) {
+//             return MessageFormat.format(getString(key), args);
+//     }
 }
index 8283e94..8309b7d 100644 (file)
@@ -23,7 +23,7 @@ import net.sourceforge.phpdt.externaltools.internal.registry.PathLocationVariabl
 import net.sourceforge.phpdt.externaltools.internal.registry.RefreshScopeVariableRegistry;
 import net.sourceforge.phpdt.externaltools.model.IExternalToolConstants;
 
-import org.eclipse.core.runtime.CoreException;
+//import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
@@ -34,7 +34,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.resource.ImageRegistry;
 import org.eclipse.swt.graphics.RGB;
 import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbenchWindow;
+//import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
@@ -97,10 +97,10 @@ public final class ExternalToolsPlugin extends AbstractUIPlugin {
        /**
         * This version is recommended for eclipse3.0 and above
         */
-       public ExternalToolsPlugin() {
-               super();
-               plugin = this;
-       }
+//     public ExternalToolsPlugin() {
+//             super();
+//             plugin = this;
+//     }
 
        /**
         * Returns the default instance of the receiver. This represents the runtime
@@ -121,10 +121,10 @@ public final class ExternalToolsPlugin extends AbstractUIPlugin {
        /**
         * Returns a new <code>CoreException</code> for this plug-in
         */
-       public static CoreException newError(String message, Throwable exception) {
-               return new CoreException(new Status(Status.ERROR,
-                               IExternalToolConstants.PLUGIN_ID, 0, message, exception));
-       }
+//     public static CoreException newError(String message, Throwable exception) {
+//             return new CoreException(new Status(Status.ERROR,
+//                             IExternalToolConstants.PLUGIN_ID, 0, message, exception));
+//     }
 
        /**
         * Returns the registry of refresh scope variables.
@@ -272,10 +272,10 @@ public final class ExternalToolsPlugin extends AbstractUIPlugin {
                                IPreferenceConstants.CONSOLE_DEBUG_RGB, new RGB(0, 0, 0)); // black
        }
 
-       public static IWorkbenchWindow getActiveWorkbenchWindow() {
-               return ExternalToolsPlugin.getDefault().getWorkbench()
-                               .getActiveWorkbenchWindow();
-       }
+//     public static IWorkbenchWindow getActiveWorkbenchWindow() {
+//             return ExternalToolsPlugin.getDefault().getWorkbench()
+//                             .getActiveWorkbenchWindow();
+//     }
 
        /**
         * Returns the standard display to be used. The method first checks, if the
index 8e74c17..0e9db24 100644 (file)
@@ -3,7 +3,7 @@ package net.sourceforge.phpeclipse.externaltools;
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.eclipse.swt.graphics.Color;
+//import org.eclipse.swt.graphics.Color;
 import org.eclipse.ui.console.ConsolePlugin;
 import org.eclipse.ui.console.IConsole;
 import org.eclipse.ui.console.MessageConsole;
@@ -31,9 +31,9 @@ public class PHPConsole {
        /**
         * @return
         */
-       public Color getColor() {
-               return stream.getColor();
-       }
+//     public Color getColor() {
+//             return stream.getColor();
+//     }
 
        /**
         * @return
@@ -62,10 +62,10 @@ public class PHPConsole {
        /**
         * 
         */
-       public void println() {
-               //hasMessages = true;
-               stream.println();
-       }
+//     public void println() {
+//             //hasMessages = true;
+//             stream.println();
+//     }
 
        /**
         * @param message
@@ -78,9 +78,9 @@ public class PHPConsole {
        /**
         * @param color
         */
-       public void setColor(Color color) {
-               stream.setColor(color);
-       }
+//     public void setColor(Color color) {
+//             stream.setColor(color);
+//     }
 
        // public void reportError(String title, String message) {
        // if (hasMessages) {