diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/SystemFileFilterStringEditPane.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/SystemFileFilterStringEditPane.java index 1c6599ba6c0..735fc733464 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/SystemFileFilterStringEditPane.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/SystemFileFilterStringEditPane.java @@ -60,7 +60,7 @@ import org.eclipse.swt.widgets.Text; * Prompts for the details of a single file filter string. */ public class SystemFileFilterStringEditPane - extends SystemFilterStringEditPane implements ISystemMessages + extends SystemFilterStringEditPane { // GUI widgets protected Button filesOnlyCheckBox; @@ -482,7 +482,7 @@ public class SystemFileFilterStringEditPane { if (textTypes.getText().trim().length() == 0) { - errorMessage = RSEUIPlugin.getPluginMessage(FILEMSG_ERROR_NOFILETYPES); + errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_ERROR_NOFILETYPES); } } controlInError = textFile; @@ -495,7 +495,7 @@ public class SystemFileFilterStringEditPane notUnique = true; if (notUnique) { - errorMessage = RSEUIPlugin.getPluginMessage(FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE).makeSubstitution(currFilterString); + errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE).makeSubstitution(currFilterString); } controlInError = textFile; } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/SystemFileTreeAndListGroup.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/SystemFileTreeAndListGroup.java index 78f12cd849b..3e590dc5110 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/SystemFileTreeAndListGroup.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/SystemFileTreeAndListGroup.java @@ -16,7 +16,6 @@ package org.eclipse.rse.files.ui; import org.eclipse.jface.viewers.ILabelProvider; -import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeContentProvider; @@ -40,7 +39,7 @@ public class SystemFileTreeAndListGroup extends org.eclipse.ui.internal.ide.dial { private Object rootObject = null; private Object lastSelectedElement = null; - private ISelectionProvider selectionProvider = null; + //private ISelectionProvider selectionProvider = null; // CONSTANTS private static final RemoteFileEmpty EMPTYROOT = new RemoteFileEmpty(); @@ -142,7 +141,7 @@ public class SystemFileTreeAndListGroup extends org.eclipse.ui.internal.ide.dial { IStructuredSelection selection = (IStructuredSelection) event.getSelection(); lastSelectedElement = selection.getFirstElement(); - selectionProvider = event.getSelectionProvider(); + //selectionProvider = event.getSelectionProvider(); super.selectionChanged(event); } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCopyRemoteFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCopyRemoteFileAction.java index fe45218b023..a7a6e23d38b 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCopyRemoteFileAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCopyRemoteFileAction.java @@ -39,7 +39,6 @@ import org.eclipse.rse.subsystems.files.core.util.ValidatorFileUniqueName; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; -import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.rse.ui.actions.SystemBaseCopyAction; import org.eclipse.rse.ui.dialogs.SystemRenameSingleDialog; import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement; @@ -53,7 +52,7 @@ import org.eclipse.swt.widgets.Shell; * Copy selected files and folders action. */ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction - implements ISystemMessages, IValidatorRemoteSelection + implements IValidatorRemoteSelection { protected IRemoteFile targetFolder, targetFileOrFolder = null; protected IRemoteFile firstSelection = null; @@ -107,7 +106,7 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction public boolean updateSelection(IStructuredSelection selection) { boolean enable = true; - Iterator e= ((IStructuredSelection) selection).iterator(); + Iterator e = selection.iterator(); while (enable && e.hasNext()) { Object selectedObject = e.next(); @@ -194,7 +193,7 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction ok = ss.copy(srcFileOrFolder, targetFolder, newName, null); if (!ok) { - SystemMessage msg = RSEUIPlugin.getPluginMessage(FILEMSG_COPY_FILE_FAILED); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_COPY_FILE_FAILED); msg.makeSubstitution(srcFileOrFolder.getName()); throw new SystemMessageException(msg); } @@ -399,10 +398,9 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction // refresh all instances of this parent, and all affected filters... ISubSystem fileSS = targetFolder.getParentRemoteFileSubSystem(); - Viewer originatingViewer = null; - if (getViewer() instanceof Viewer) + Viewer originatingViewer = getViewer(); + if (originatingViewer != null) { - originatingViewer = (Viewer)getViewer(); if (!targetFolder.getAbsolutePath().equals(firstSelectionParent.getAbsolutePath())) { // we select the first instance of the target folder now so that the copied members will be selected in it @@ -474,7 +472,7 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction { if (files == null) { - IStructuredSelection selection = (IStructuredSelection)getSelection(); + IStructuredSelection selection = getSelection(); files = new IRemoteFile[selection.size()]; Iterator i = selection.iterator(); int idx=0; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemDownloadConflictAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemDownloadConflictAction.java index e3213c6f96e..03a1773fbba 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemDownloadConflictAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemDownloadConflictAction.java @@ -21,7 +21,6 @@ import org.eclipse.jface.window.Window; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.resources.SystemIFileProperties; -import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.rse.ui.dialogs.SystemPromptDialog; @@ -46,7 +45,7 @@ public class SystemDownloadConflictAction extends SystemBaseAction implements Ru /** * This is the default dialog used to handle download conflicts */ - protected class DownloadConflictDialog extends SystemPromptDialog implements ISystemMessages + protected class DownloadConflictDialog extends SystemPromptDialog { private Button _keepLocalButton; private Button _replaceLocalButton; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemExtractToAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemExtractToAction.java index 64e30c77f99..c4c78787cef 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemExtractToAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemExtractToAction.java @@ -42,7 +42,7 @@ import org.eclipse.swt.widgets.Shell; * To change the template for this generated type comment go to * Window>Preferences>Java>Code Generation>Code and Comments */ -public class SystemExtractToAction extends SystemExtractAction implements IValidatorRemoteSelection, ISystemMessages +public class SystemExtractToAction extends SystemExtractAction implements IValidatorRemoteSelection { protected static final String[] systemTypes = { IRSESystemType.SYSTEMTYPE_LOCAL, IRSESystemType.SYSTEMTYPE_WINDOWS, @@ -76,7 +76,7 @@ public class SystemExtractToAction extends SystemExtractAction implements IValid { currentlyProcessingSelection = i; IRemoteFile selection = (IRemoteFile) _selected.get(i); - IRemoteFileSubSystem sourceSS = selection.getParentRemoteFileSubSystem(); + //IRemoteFileSubSystem sourceSS = selection.getParentRemoteFileSubSystem(); String title = FileResources.RESID_EXTRACTTO_TITLE; ExtractToDialog dialog = new ExtractToDialog(getShell(), title); if (dialog == null) @@ -189,7 +189,7 @@ public class SystemExtractToAction extends SystemExtractAction implements IValid if (selectedFolder.isDescendantOf(currentSelection)) { if (targetDescendsFromSrcMsg == null) - targetDescendsFromSrcMsg = RSEUIPlugin.getPluginMessage(FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOUCE); + targetDescendsFromSrcMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOUCE); return targetDescendsFromSrcMsg; } else diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemMoveRemoteFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemMoveRemoteFileAction.java index fe2a518e453..7abd3879734 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemMoveRemoteFileAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemMoveRemoteFileAction.java @@ -27,7 +27,6 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.RSEUIPlugin; -import org.eclipse.rse.ui.actions.SystemBaseCopyAction; import org.eclipse.rse.ui.validators.IValidatorRemoteSelection; import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; import org.eclipse.swt.widgets.Shell; @@ -37,7 +36,7 @@ import org.eclipse.swt.widgets.Shell; * Move selected files and folders action. */ public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction - implements ISystemMessages, IValidatorRemoteSelection + implements IValidatorRemoteSelection { private SystemMessage targetEqualsSrcMsg = null; private SystemMessage targetDescendsFromSrcMsg = null; @@ -87,7 +86,7 @@ public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction ok = ss.move(srcFileOrFolder, targetFolder, newName, monitor); if (!ok) { - SystemMessage msg = RSEUIPlugin.getPluginMessage(FILEMSG_MOVE_FILE_FAILED); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_FILE_FAILED); msg.makeSubstitution(srcFileOrFolder.getName()); throw new SystemMessageException(msg); } @@ -120,19 +119,19 @@ public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction if (selectedFolder.getAbsolutePath().equals(firstSelectionParent.getAbsolutePath())) { if (targetEqualsSrcMsg == null) - targetEqualsSrcMsg = RSEUIPlugin.getPluginMessage(FILEMSG_MOVE_TARGET_EQUALS_SOURCE); + targetEqualsSrcMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_TARGET_EQUALS_SOURCE); return targetEqualsSrcMsg; } else if (selectedFolder.getAbsolutePath().equals(firstSelection.getAbsolutePath())) { if (targetEqualsSrcMsg == null) - targetEqualsSrcMsg = RSEUIPlugin.getPluginMessage(FILEMSG_MOVE_TARGET_EQUALS_SOURCE); // todo: different msg + targetEqualsSrcMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_TARGET_EQUALS_SOURCE); // todo: different msg return targetEqualsSrcMsg; } else if (selectedFolder.isDescendantOf(firstSelection)) { if (targetDescendsFromSrcMsg == null) - targetDescendsFromSrcMsg = RSEUIPlugin.getPluginMessage(FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOUCE); + targetDescendsFromSrcMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOUCE); return targetDescendsFromSrcMsg; } else diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFileFilterFromFolderAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFileFilterFromFolderAction.java index 00ea4f2e29c..5a74e9cc7b5 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFileFilterFromFolderAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFileFilterFromFolderAction.java @@ -19,7 +19,6 @@ package org.eclipse.rse.files.ui.actions; import java.util.Iterator; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.filters.ISystemFilterPool; import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; @@ -53,7 +52,7 @@ public class SystemNewFileFilterFromFolderAction extends SystemNewFileFilterActi public void run() { IRemoteFileSubSystem fileSubsystem = _selected.getParentRemoteFileSubSystem(); - ISubSystemConfiguration factory = fileSubsystem.getSubSystemConfiguration(); + //ISubSystemConfiguration config = fileSubsystem.getSubSystemConfiguration(); ISystemFilterPool filterPool = fileSubsystem.getFilterPoolReferenceManager().getDefaultSystemFilterPoolManager().getFirstDefaultSystemFilterPool(); setParentFilterPool(filterPool); setAllowFilterPoolSelection(fileSubsystem.getFilterPoolReferenceManager().getReferencedSystemFilterPools()); @@ -72,7 +71,7 @@ public class SystemNewFileFilterFromFolderAction extends SystemNewFileFilterActi { boolean enable = false; - Iterator e = ((IStructuredSelection) selection).iterator(); + Iterator e = selection.iterator(); Object selected = e.next(); if (selected != null && selected instanceof IRemoteFile) diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileSelectAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileSelectAction.java index 6a3501f38b5..5e63c157d8b 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileSelectAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileSelectAction.java @@ -396,7 +396,7 @@ public class SystemRemoteFileSelectAction extends SystemBaseDialogAction return (Object[])remoteObject; else if (remoteObject instanceof IRemoteFile[]) return (Object[])remoteObject; - else if (remoteObject instanceof Object) + else if (remoteObject != null) return new Object[] {remoteObject}; else return null; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemUploadConflictAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemUploadConflictAction.java index 5a121a03a7a..6e4837f961b 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemUploadConflictAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemUploadConflictAction.java @@ -67,7 +67,7 @@ public class SystemUploadConflictAction extends SystemBaseAction implements Runn /** * This is the default dialog used to handle upload conflicts */ - private class UploadConflictDialog extends SystemPromptDialog implements ISystemMessages, SelectionListener + private class UploadConflictDialog extends SystemPromptDialog implements SelectionListener { private Button _overwriteLocalButton; private Button _overwriteRemoteButton; @@ -237,7 +237,7 @@ public class SystemUploadConflictAction extends SystemBaseAction implements Runn else { enableOkButton(false); - _errorMessage = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_PATH_EMPTY); + _errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PATH_EMPTY); setErrorMessage(_errorMessage); } } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemFilePropertyPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemFilePropertyPage.java index 84392b188ed..0102c5e52a1 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemFilePropertyPage.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemFilePropertyPage.java @@ -43,7 +43,7 @@ import org.eclipse.swt.widgets.Label; * The plugin.xml file registers this for remote file system objects. */ public class SystemFilePropertyPage extends SystemBasePropertyPage - implements ISystemMessages, SelectionListener + implements SelectionListener { protected Label labelNamePrompt, labelTypePrompt, labelPathPrompt, labelSizePrompt, diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewRemoteFileAdapter.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewRemoteFileAdapter.java index e27c2c3617b..9dd563a0b18 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewRemoteFileAdapter.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewRemoteFileAdapter.java @@ -67,7 +67,7 @@ import org.eclipse.rse.filters.SystemFilterReference; import org.eclipse.rse.model.IHost; import org.eclipse.rse.model.ISystemMessageObject; import org.eclipse.rse.model.ISystemRegistry; -import org.eclipse.rse.model.ISystemResourceChangeEvent; +import org.eclipse.rse.model.ISystemResourceChangeEvents; import org.eclipse.rse.model.ISystemResourceSet; import org.eclipse.rse.model.SystemMessageObject; import org.eclipse.rse.model.SystemRemoteResourceSet; @@ -131,7 +131,6 @@ import org.eclipse.ui.ISharedImages; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.progress.IElementCollector; -import org.eclipse.ui.progress.UIJob; import org.eclipse.ui.views.properties.IPropertyDescriptor; import org.eclipse.ui.views.properties.PropertyDescriptor; @@ -143,7 +142,7 @@ import org.eclipse.ui.views.properties.PropertyDescriptor; public class SystemViewRemoteFileAdapter extends AbstractSystemViewAdapter implements ISystemViewElementAdapter, ISystemRemoteElementAdapter, - ISystemMessages, ISystemPropertyConstants + ISystemPropertyConstants { private String xlatedSize = null; @@ -733,13 +732,13 @@ public class SystemViewRemoteFileAdapter catch (InterruptedException exc) { children = new SystemMessageObject[1]; - children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_EXPAND_CANCELLED), ISystemMessageObject.MSGTYPE_CANCEL, element); + children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED), ISystemMessageObject.MSGTYPE_CANCEL, element); //System.out.println("Canceled."); } catch (Exception exc) { children = new SystemMessageObject[1]; - children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_EXPAND_FAILED), ISystemMessageObject.MSGTYPE_ERROR, element); + children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FAILED), ISystemMessageObject.MSGTYPE_ERROR, element); SystemBasePlugin.logError("Exception resolving file filter strings", exc); } // message already issued } @@ -1502,13 +1501,12 @@ public class SystemViewRemoteFileAdapter Display display = Display.getCurrent(); if (display != null) { - while (display.readAndDispatch()); - try - { - Thread.sleep(100); - } - catch (Exception e) - { + while (display.readAndDispatch()) { + try { + Thread.sleep(100); + } catch (InterruptedException e) { + break; + } } } } @@ -1518,7 +1516,7 @@ public class SystemViewRemoteFileAdapter { Thread.sleep(100); } - catch (Exception e) + catch (InterruptedException e) { } } @@ -2425,7 +2423,7 @@ public class SystemViewRemoteFileAdapter { // update all tree views showing this remote folder... // Hmm, why do we do this, given SystemView sends a rename event? I think we needed to refresh all child cached references to parent folder name... - SystemResourceChangeEvent event = new SystemResourceChangeEvent(file.getParentRemoteFile(), ISystemResourceChangeEvent.EVENT_REFRESH_REMOTE, null); + SystemResourceChangeEvent event = new SystemResourceChangeEvent(file.getParentRemoteFile(), ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE, null); sr.fireEvent(event); //sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, file, file.getParentRemoteFile(), file.getParentRemoteFileSubSystem(), null, null); } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemQualifiedRemoteFolderCombo.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemQualifiedRemoteFolderCombo.java index b29478381cd..40f2857b584 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemQualifiedRemoteFolderCombo.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemQualifiedRemoteFolderCombo.java @@ -70,7 +70,7 @@ import org.eclipse.swt.widgets.Shell; * To listen for changes, use addSelectionListener(). */ public class SystemQualifiedRemoteFolderCombo extends Composite - implements ISystemMessages, ISystemCombo + implements ISystemCombo { public static final char CONNECTION_DELIMITER = IRemoteFile.CONNECTION_DELIMITER; private Label folderLabel = null; @@ -570,7 +570,7 @@ public class SystemQualifiedRemoteFolderCombo extends Composite ISystemProfile profile = sr.getSystemProfile(profileName); if (profile == null) { - msg = RSEUIPlugin.getPluginMessage(MSG_ERROR_PROFILE_NOTFOUND); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_PROFILE_NOTFOUND); msg.makeSubstitution(profileName); throw new Exception(msg.getLevelOneText()); } @@ -579,7 +579,7 @@ public class SystemQualifiedRemoteFolderCombo extends Composite IHost conn = RSEUIPlugin.getTheSystemRegistry().getHost(profile,connName); if (conn == null) { - msg = RSEUIPlugin.getPluginMessage(MSG_ERROR_CONNECTION_NOTFOUND); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_CONNECTION_NOTFOUND); msg.makeSubstitution(connName); throw new Exception(msg.getLevelOneText()); } @@ -594,7 +594,7 @@ public class SystemQualifiedRemoteFolderCombo extends Composite if (filesubsystems.length == 0) { - msg = RSEUIPlugin.getPluginMessage(MSG_ERROR_CONNECTION_NOTFOUND);// hmm, what else to say? + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_CONNECTION_NOTFOUND);// hmm, what else to say? msg.makeSubstitution(connName); throw new Exception(msg.getLevelOneText()); } @@ -606,12 +606,12 @@ public class SystemQualifiedRemoteFolderCombo extends Composite ss.connect(getShell()); // will throw exception if fails. } catch (InterruptedException exc) { - msg = RSEUIPlugin.getPluginMessage(MSG_CONNECT_CANCELLED); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_CANCELLED); msg.makeSubstitution(conn.getHostName()); throw new Exception(msg.getLevelOneText()); } catch (Exception exc) { - msg = RSEUIPlugin.getPluginMessage(MSG_CONNECT_FAILED); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED); msg.makeSubstitution(conn.getHostName()); throw new Exception(msg.getLevelOneText()); } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFileOrFolderForm.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFileOrFolderForm.java index 8f2b76fc81f..005e6491bb8 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFileOrFolderForm.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFileOrFolderForm.java @@ -44,7 +44,6 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration; import org.eclipse.rse.subsystems.files.core.util.SystemRemoteFileMatcher; import org.eclipse.rse.ui.ISystemIconConstants; -import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.dialogs.SystemPromptDialog; @@ -99,7 +98,7 @@ import org.eclipse.swt.widgets.Text; * */ public class SystemSelectRemoteFileOrFolderForm - implements ISelectionChangedListener, ISystemIconConstants, ISystemMessages + implements ISelectionChangedListener, ISystemIconConstants { protected static final int PROMPT_WIDTH = 400; // The maximum width of the dialog's prompt, in pixels. @@ -286,7 +285,7 @@ public class SystemSelectRemoteFileOrFolderForm setSystemConnection(connection); setShowNewConnectionPrompt(false); setAutoExpandDepth(1); - ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); + //ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(connection); IRemoteFileSubSystemConfiguration ssf = ss.getParentRemoteFileSubSystemConfiguration(); RemoteFileFilterString rffs = new RemoteFileFilterString(ssf); diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemFileNewConnectionWizardPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemFileNewConnectionWizardPage.java index a90a22eb911..b0ea9d9124c 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemFileNewConnectionWizardPage.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemFileNewConnectionWizardPage.java @@ -23,8 +23,6 @@ import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.validators.ISystemValidator; import org.eclipse.rse.ui.validators.ValidatorServerPortInput; import org.eclipse.rse.ui.wizards.AbstractSystemNewConnectionWizardPage; -import org.eclipse.rse.ui.wizards.AbstractSystemWizardPage; -import org.eclipse.rse.ui.wizards.ISystemWizardPage; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.widgets.Composite; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFileWizard.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFileWizard.java index 7df9c50b9aa..2340a7550c5 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFileWizard.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFileWizard.java @@ -19,7 +19,6 @@ package org.eclipse.rse.files.ui.wizards; import java.util.Vector; import org.eclipse.jface.viewers.Viewer; -import org.eclipse.jface.wizard.WizardPage; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.files.ui.FileResources; @@ -50,7 +49,6 @@ import org.eclipse.rse.ui.wizards.AbstractSystemWizard; public class SystemNewFileWizard extends AbstractSystemWizard - implements ISystemMessages { private SystemNewFileWizardMainPage mainPage; @@ -79,7 +77,7 @@ public class SystemNewFileWizard { try { mainPage = createMainPage(); - addPage((WizardPage)mainPage); + addPage(mainPage); //super.addPages(); } catch (Exception exc) { @@ -175,12 +173,12 @@ public class SystemNewFileWizard newFile = rfss.createFile(newFilePath); } catch (RemoteFileIOException exc ) { SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileIOException " ); - msg = (RSEUIPlugin.getPluginMessage(FILEMSG_CREATE_FILE_FAILED_EXIST)).makeSubstitution(absName); + msg = (RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_FILE_FAILED_EXIST)).makeSubstitution(absName); mainPage.setMessage(msg); ok = false; //DY } catch (Exception RemoteFileSecurityException) { } catch (RemoteFileSecurityException e) { - msg = (RSEUIPlugin.getPluginMessage(FILEMSG_CREATE_FILE_FAILED)).makeSubstitution(absName); + msg = (RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_FILE_FAILED)).makeSubstitution(absName); SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileSecurityException "); //SystemMessage.displayErrorMessage(SystemMessage.getDefaultShell(), msg); mainPage.setMessage(msg); diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFileWizardMainPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFileWizardMainPage.java index f436642ea91..19b149402b9 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFileWizardMainPage.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFileWizardMainPage.java @@ -46,7 +46,6 @@ import org.eclipse.swt.widgets.Text; public class SystemNewFileWizardMainPage extends AbstractSystemWizardPage - implements ISystemMessages { protected String fileNameStr; @@ -103,7 +102,7 @@ public class SystemNewFileWizardMainPage } ); - SystemWidgetHelpers.setCompositeHelp(composite_prompts, RSEUIPlugin.HELPPREFIX+NEW_FILE_WIZARD); + SystemWidgetHelpers.setCompositeHelp(composite_prompts, RSEUIPlugin.HELPPREFIX+ISystemMessages.NEW_FILE_WIZARD); return composite_prompts; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFolderWizard.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFolderWizard.java index 70cfcfd7ab0..4a73c40e742 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFolderWizard.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFolderWizard.java @@ -16,7 +16,6 @@ package org.eclipse.rse.files.ui.wizards; -import org.eclipse.jface.wizard.WizardPage; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.filters.ISystemFilter; @@ -36,7 +35,6 @@ import org.eclipse.rse.ui.wizards.AbstractSystemWizard; public class SystemNewFolderWizard extends AbstractSystemWizard - implements ISystemMessages { private SystemNewFolderWizardMainPage mainPage; @@ -64,7 +62,7 @@ public class SystemNewFolderWizard { try { mainPage = createMainPage(); - addPage((WizardPage)mainPage); + addPage(mainPage); //super.addPages(); } catch (Exception exc) { @@ -166,14 +164,14 @@ public class SystemNewFolderWizard } else { - msg = (RSEUIPlugin.getPluginMessage(FILEMSG_CREATE_FOLDER_FAILED_EXIST)).makeSubstitution(absName); + msg = (RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_FOLDER_FAILED_EXIST)).makeSubstitution(absName); } mainPage.setMessage(msg); ok = false; // DY } catch (Exception RemoteFileSecurityException) { } catch (RemoteFileSecurityException e) { SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileSecurityException "); - msg = (RSEUIPlugin.getPluginMessage(FILEMSG_CREATE_FOLDER_FAILED)).makeSubstitution(absName); + msg = (RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_FOLDER_FAILED)).makeSubstitution(absName); //SystemMessage.displayErrorMessage(SystemMessage.getDefaultShell(), msg); mainPage.setMessage(msg); ok = false; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFolderWizardMainPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFolderWizardMainPage.java index 9d1da17c25f..ed94499ff64 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFolderWizardMainPage.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFolderWizardMainPage.java @@ -47,7 +47,6 @@ import org.eclipse.swt.widgets.Text; public class SystemNewFolderWizardMainPage extends AbstractSystemWizardPage - implements ISystemMessages { protected String fileNameStr; @@ -107,7 +106,7 @@ public class SystemNewFolderWizardMainPage } ); - SystemWidgetHelpers.setCompositeHelp(composite_prompts, RSEUIPlugin.HELPPREFIX+NEW_FOLDER_WIZARD); + SystemWidgetHelpers.setCompositeHelp(composite_prompts, RSEUIPlugin.HELPPREFIX+ISystemMessages.NEW_FOLDER_WIZARD); return composite_prompts; diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/SystemProcessFilterStringEditPane.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/SystemProcessFilterStringEditPane.java index ee2f24c6225..91026424007 100644 --- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/SystemProcessFilterStringEditPane.java +++ b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/SystemProcessFilterStringEditPane.java @@ -54,7 +54,7 @@ import org.eclipse.swt.widgets.Text; public class SystemProcessFilterStringEditPane extends - SystemFilterStringEditPane implements ISystemMessages, ISystemProcessRemoteConstants + SystemFilterStringEditPane implements ISystemProcessRemoteConstants { // GUI widgets @@ -475,7 +475,7 @@ public class SystemProcessFilterStringEditPane extends notUnique = true; if (notUnique) { - errorMessage = RSEUIPlugin.getPluginMessage(FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE).makeSubstitution(currFilterString); + errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE).makeSubstitution(currFilterString); } controlInError = txtExeName; } diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemViewProcessAdapterFactory.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemViewProcessAdapterFactory.java index 1f7bf8e170b..2b6242a6ea0 100644 --- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemViewProcessAdapterFactory.java +++ b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemViewProcessAdapterFactory.java @@ -16,7 +16,6 @@ package org.eclipse.rse.processes.ui.view; -import org.eclipse.core.runtime.IAdapterFactory; import org.eclipse.core.runtime.IAdapterManager; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess; diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemViewRemoteProcessAdapter.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemViewRemoteProcessAdapter.java index 70e49e7a60a..b543c492d02 100644 --- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemViewRemoteProcessAdapter.java +++ b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/view/SystemViewRemoteProcessAdapter.java @@ -48,7 +48,7 @@ import org.eclipse.ui.views.properties.PropertyDescriptor; public class SystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter - implements ISystemViewElementAdapter, ISystemRemoteElementAdapter, ISystemMessages, + implements ISystemViewElementAdapter, ISystemRemoteElementAdapter, ISystemProcessPropertyConstants, ISystemProcessRemoteConstants { private SystemCopyToClipboardAction copyClipboardAction; @@ -180,7 +180,7 @@ public class SystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter catch (Exception exc) { children = new SystemMessageObject[1]; - children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_EXPAND_FAILED), ISystemMessageObject.MSGTYPE_ERROR, element); + children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FAILED), ISystemMessageObject.MSGTYPE_ERROR, element); SystemBasePlugin.logError("Exception resolving file filter strings", exc); } return children; diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemBaseShellAction.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemBaseShellAction.java index a8515451d3c..99cc5142014 100644 --- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemBaseShellAction.java +++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemBaseShellAction.java @@ -51,7 +51,7 @@ public abstract class SystemBaseShellAction extends SystemBaseAction public boolean updateSelection(IStructuredSelection selection) { boolean enable = false; - Iterator e = ((IStructuredSelection) selection).iterator(); + Iterator e = selection.iterator(); _selected.clear(); while (e.hasNext()) { diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemCommandAction.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemCommandAction.java index 8a66b13475b..5f691ad683e 100644 --- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemCommandAction.java +++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/actions/SystemCommandAction.java @@ -69,7 +69,7 @@ public class SystemCommandAction extends SystemBaseAction /** * The command dialog used when running a command. */ - public class CommandDialog extends SystemPromptDialog implements ISystemMessages + public class CommandDialog extends SystemPromptDialog { private Combo _cmdText; private Button _launchNewShellButton; @@ -187,7 +187,7 @@ public class SystemCommandAction extends SystemBaseAction if (theNewName.length() == 0) { - _errorMessage = RSEUIPlugin.getPluginMessage(MSG_UCMD_INVOCATION_EMPTY); + _errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UCMD_INVOCATION_EMPTY); } if (_errorMessage != null) @@ -528,7 +528,7 @@ public class SystemCommandAction extends SystemBaseAction { boolean enable = false; - Iterator e = ((IStructuredSelection) selection).iterator(); + Iterator e = selection.iterator(); Object selected = e.next(); if (selected != null)