1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-08 17:45:24 +02:00

[cleanup] Remove "implements" use of ISystemMessages

This commit is contained in:
Martin Oberhuber 2006-08-25 11:24:19 +00:00
parent ee87343666
commit a770fcce43
23 changed files with 62 additions and 80 deletions

View file

@ -60,7 +60,7 @@ import org.eclipse.swt.widgets.Text;
* Prompts for the details of a single file filter string. * Prompts for the details of a single file filter string.
*/ */
public class SystemFileFilterStringEditPane public class SystemFileFilterStringEditPane
extends SystemFilterStringEditPane implements ISystemMessages extends SystemFilterStringEditPane
{ {
// GUI widgets // GUI widgets
protected Button filesOnlyCheckBox; protected Button filesOnlyCheckBox;
@ -482,7 +482,7 @@ public class SystemFileFilterStringEditPane
{ {
if (textTypes.getText().trim().length() == 0) if (textTypes.getText().trim().length() == 0)
{ {
errorMessage = RSEUIPlugin.getPluginMessage(FILEMSG_ERROR_NOFILETYPES); errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_ERROR_NOFILETYPES);
} }
} }
controlInError = textFile; controlInError = textFile;
@ -495,7 +495,7 @@ public class SystemFileFilterStringEditPane
notUnique = true; notUnique = true;
if (notUnique) if (notUnique)
{ {
errorMessage = RSEUIPlugin.getPluginMessage(FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE).makeSubstitution(currFilterString); errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE).makeSubstitution(currFilterString);
} }
controlInError = textFile; controlInError = textFile;
} }

View file

@ -16,7 +16,6 @@
package org.eclipse.rse.files.ui; package org.eclipse.rse.files.ui;
import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider; 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 rootObject = null;
private Object lastSelectedElement = null; private Object lastSelectedElement = null;
private ISelectionProvider selectionProvider = null; //private ISelectionProvider selectionProvider = null;
// CONSTANTS // CONSTANTS
private static final RemoteFileEmpty EMPTYROOT = new RemoteFileEmpty(); 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(); IStructuredSelection selection = (IStructuredSelection) event.getSelection();
lastSelectedElement = selection.getFirstElement(); lastSelectedElement = selection.getFirstElement();
selectionProvider = event.getSelectionProvider(); //selectionProvider = event.getSelectionProvider();
super.selectionChanged(event); super.selectionChanged(event);
} }

View file

@ -39,7 +39,6 @@ import org.eclipse.rse.subsystems.files.core.util.ValidatorFileUniqueName;
import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.ISystemMessages;
import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.SystemResources; 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.actions.SystemBaseCopyAction;
import org.eclipse.rse.ui.dialogs.SystemRenameSingleDialog; import org.eclipse.rse.ui.dialogs.SystemRenameSingleDialog;
import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement; import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
@ -53,7 +52,7 @@ import org.eclipse.swt.widgets.Shell;
* Copy selected files and folders action. * Copy selected files and folders action.
*/ */
public class SystemCopyRemoteFileAction extends SystemBaseCopyAction public class SystemCopyRemoteFileAction extends SystemBaseCopyAction
implements ISystemMessages, IValidatorRemoteSelection implements IValidatorRemoteSelection
{ {
protected IRemoteFile targetFolder, targetFileOrFolder = null; protected IRemoteFile targetFolder, targetFileOrFolder = null;
protected IRemoteFile firstSelection = null; protected IRemoteFile firstSelection = null;
@ -107,7 +106,7 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction
public boolean updateSelection(IStructuredSelection selection) public boolean updateSelection(IStructuredSelection selection)
{ {
boolean enable = true; boolean enable = true;
Iterator e= ((IStructuredSelection) selection).iterator(); Iterator e = selection.iterator();
while (enable && e.hasNext()) while (enable && e.hasNext())
{ {
Object selectedObject = e.next(); Object selectedObject = e.next();
@ -194,7 +193,7 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction
ok = ss.copy(srcFileOrFolder, targetFolder, newName, null); ok = ss.copy(srcFileOrFolder, targetFolder, newName, null);
if (!ok) if (!ok)
{ {
SystemMessage msg = RSEUIPlugin.getPluginMessage(FILEMSG_COPY_FILE_FAILED); SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_COPY_FILE_FAILED);
msg.makeSubstitution(srcFileOrFolder.getName()); msg.makeSubstitution(srcFileOrFolder.getName());
throw new SystemMessageException(msg); throw new SystemMessageException(msg);
} }
@ -399,10 +398,9 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction
// refresh all instances of this parent, and all affected filters... // refresh all instances of this parent, and all affected filters...
ISubSystem fileSS = targetFolder.getParentRemoteFileSubSystem(); ISubSystem fileSS = targetFolder.getParentRemoteFileSubSystem();
Viewer originatingViewer = null; Viewer originatingViewer = getViewer();
if (getViewer() instanceof Viewer) if (originatingViewer != null)
{ {
originatingViewer = (Viewer)getViewer();
if (!targetFolder.getAbsolutePath().equals(firstSelectionParent.getAbsolutePath())) 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 // 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) if (files == null)
{ {
IStructuredSelection selection = (IStructuredSelection)getSelection(); IStructuredSelection selection = getSelection();
files = new IRemoteFile[selection.size()]; files = new IRemoteFile[selection.size()];
Iterator i = selection.iterator(); Iterator i = selection.iterator();
int idx=0; int idx=0;

View file

@ -21,7 +21,6 @@ import org.eclipse.jface.window.Window;
import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.SystemBasePlugin;
import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.FileResources;
import org.eclipse.rse.files.ui.resources.SystemIFileProperties; 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.RSEUIPlugin;
import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.rse.ui.actions.SystemBaseAction;
import org.eclipse.rse.ui.dialogs.SystemPromptDialog; 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 * 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 _keepLocalButton;
private Button _replaceLocalButton; private Button _replaceLocalButton;

View file

@ -42,7 +42,7 @@ import org.eclipse.swt.widgets.Shell;
* To change the template for this generated type comment go to * To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments * 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, protected static final String[] systemTypes = { IRSESystemType.SYSTEMTYPE_LOCAL,
IRSESystemType.SYSTEMTYPE_WINDOWS, IRSESystemType.SYSTEMTYPE_WINDOWS,
@ -76,7 +76,7 @@ public class SystemExtractToAction extends SystemExtractAction implements IValid
{ {
currentlyProcessingSelection = i; currentlyProcessingSelection = i;
IRemoteFile selection = (IRemoteFile) _selected.get(i); IRemoteFile selection = (IRemoteFile) _selected.get(i);
IRemoteFileSubSystem sourceSS = selection.getParentRemoteFileSubSystem(); //IRemoteFileSubSystem sourceSS = selection.getParentRemoteFileSubSystem();
String title = FileResources.RESID_EXTRACTTO_TITLE; String title = FileResources.RESID_EXTRACTTO_TITLE;
ExtractToDialog dialog = new ExtractToDialog(getShell(), title); ExtractToDialog dialog = new ExtractToDialog(getShell(), title);
if (dialog == null) if (dialog == null)
@ -189,7 +189,7 @@ public class SystemExtractToAction extends SystemExtractAction implements IValid
if (selectedFolder.isDescendantOf(currentSelection)) if (selectedFolder.isDescendantOf(currentSelection))
{ {
if (targetDescendsFromSrcMsg == null) if (targetDescendsFromSrcMsg == null)
targetDescendsFromSrcMsg = RSEUIPlugin.getPluginMessage(FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOUCE); targetDescendsFromSrcMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOUCE);
return targetDescendsFromSrcMsg; return targetDescendsFromSrcMsg;
} }
else else

View file

@ -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.subsystems.files.core.subsystems.IRemoteFileSubSystem;
import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.ISystemMessages;
import org.eclipse.rse.ui.RSEUIPlugin; 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.validators.IValidatorRemoteSelection;
import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
@ -37,7 +36,7 @@ import org.eclipse.swt.widgets.Shell;
* Move selected files and folders action. * Move selected files and folders action.
*/ */
public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction
implements ISystemMessages, IValidatorRemoteSelection implements IValidatorRemoteSelection
{ {
private SystemMessage targetEqualsSrcMsg = null; private SystemMessage targetEqualsSrcMsg = null;
private SystemMessage targetDescendsFromSrcMsg = null; private SystemMessage targetDescendsFromSrcMsg = null;
@ -87,7 +86,7 @@ public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction
ok = ss.move(srcFileOrFolder, targetFolder, newName, monitor); ok = ss.move(srcFileOrFolder, targetFolder, newName, monitor);
if (!ok) if (!ok)
{ {
SystemMessage msg = RSEUIPlugin.getPluginMessage(FILEMSG_MOVE_FILE_FAILED); SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_FILE_FAILED);
msg.makeSubstitution(srcFileOrFolder.getName()); msg.makeSubstitution(srcFileOrFolder.getName());
throw new SystemMessageException(msg); throw new SystemMessageException(msg);
} }
@ -120,19 +119,19 @@ public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction
if (selectedFolder.getAbsolutePath().equals(firstSelectionParent.getAbsolutePath())) if (selectedFolder.getAbsolutePath().equals(firstSelectionParent.getAbsolutePath()))
{ {
if (targetEqualsSrcMsg == null) if (targetEqualsSrcMsg == null)
targetEqualsSrcMsg = RSEUIPlugin.getPluginMessage(FILEMSG_MOVE_TARGET_EQUALS_SOURCE); targetEqualsSrcMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_TARGET_EQUALS_SOURCE);
return targetEqualsSrcMsg; return targetEqualsSrcMsg;
} }
else if (selectedFolder.getAbsolutePath().equals(firstSelection.getAbsolutePath())) else if (selectedFolder.getAbsolutePath().equals(firstSelection.getAbsolutePath()))
{ {
if (targetEqualsSrcMsg == null) 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; return targetEqualsSrcMsg;
} }
else if (selectedFolder.isDescendantOf(firstSelection)) else if (selectedFolder.isDescendantOf(firstSelection))
{ {
if (targetDescendsFromSrcMsg == null) if (targetDescendsFromSrcMsg == null)
targetDescendsFromSrcMsg = RSEUIPlugin.getPluginMessage(FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOUCE); targetDescendsFromSrcMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOUCE);
return targetDescendsFromSrcMsg; return targetDescendsFromSrcMsg;
} }
else else

View file

@ -19,7 +19,6 @@ package org.eclipse.rse.files.ui.actions;
import java.util.Iterator; import java.util.Iterator;
import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.filters.ISystemFilterPool; import org.eclipse.rse.filters.ISystemFilterPool;
import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
@ -53,7 +52,7 @@ public class SystemNewFileFilterFromFolderAction extends SystemNewFileFilterActi
public void run() public void run()
{ {
IRemoteFileSubSystem fileSubsystem = _selected.getParentRemoteFileSubSystem(); IRemoteFileSubSystem fileSubsystem = _selected.getParentRemoteFileSubSystem();
ISubSystemConfiguration factory = fileSubsystem.getSubSystemConfiguration(); //ISubSystemConfiguration config = fileSubsystem.getSubSystemConfiguration();
ISystemFilterPool filterPool = fileSubsystem.getFilterPoolReferenceManager().getDefaultSystemFilterPoolManager().getFirstDefaultSystemFilterPool(); ISystemFilterPool filterPool = fileSubsystem.getFilterPoolReferenceManager().getDefaultSystemFilterPoolManager().getFirstDefaultSystemFilterPool();
setParentFilterPool(filterPool); setParentFilterPool(filterPool);
setAllowFilterPoolSelection(fileSubsystem.getFilterPoolReferenceManager().getReferencedSystemFilterPools()); setAllowFilterPoolSelection(fileSubsystem.getFilterPoolReferenceManager().getReferencedSystemFilterPools());
@ -72,7 +71,7 @@ public class SystemNewFileFilterFromFolderAction extends SystemNewFileFilterActi
{ {
boolean enable = false; boolean enable = false;
Iterator e = ((IStructuredSelection) selection).iterator(); Iterator e = selection.iterator();
Object selected = e.next(); Object selected = e.next();
if (selected != null && selected instanceof IRemoteFile) if (selected != null && selected instanceof IRemoteFile)

View file

@ -396,7 +396,7 @@ public class SystemRemoteFileSelectAction extends SystemBaseDialogAction
return (Object[])remoteObject; return (Object[])remoteObject;
else if (remoteObject instanceof IRemoteFile[]) else if (remoteObject instanceof IRemoteFile[])
return (Object[])remoteObject; return (Object[])remoteObject;
else if (remoteObject instanceof Object) else if (remoteObject != null)
return new Object[] {remoteObject}; return new Object[] {remoteObject};
else else
return null; return null;

View file

@ -67,7 +67,7 @@ public class SystemUploadConflictAction extends SystemBaseAction implements Runn
/** /**
* This is the default dialog used to handle upload conflicts * 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 _overwriteLocalButton;
private Button _overwriteRemoteButton; private Button _overwriteRemoteButton;
@ -237,7 +237,7 @@ public class SystemUploadConflictAction extends SystemBaseAction implements Runn
else else
{ {
enableOkButton(false); enableOkButton(false);
_errorMessage = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_PATH_EMPTY); _errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PATH_EMPTY);
setErrorMessage(_errorMessage); setErrorMessage(_errorMessage);
} }
} }

View file

@ -43,7 +43,7 @@ import org.eclipse.swt.widgets.Label;
* The plugin.xml file registers this for remote file system objects. * The plugin.xml file registers this for remote file system objects.
*/ */
public class SystemFilePropertyPage extends SystemBasePropertyPage public class SystemFilePropertyPage extends SystemBasePropertyPage
implements ISystemMessages, SelectionListener implements SelectionListener
{ {
protected Label labelNamePrompt, labelTypePrompt, labelPathPrompt, labelSizePrompt, protected Label labelNamePrompt, labelTypePrompt, labelPathPrompt, labelSizePrompt,

View file

@ -67,7 +67,7 @@ import org.eclipse.rse.filters.SystemFilterReference;
import org.eclipse.rse.model.IHost; import org.eclipse.rse.model.IHost;
import org.eclipse.rse.model.ISystemMessageObject; import org.eclipse.rse.model.ISystemMessageObject;
import org.eclipse.rse.model.ISystemRegistry; 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.ISystemResourceSet;
import org.eclipse.rse.model.SystemMessageObject; import org.eclipse.rse.model.SystemMessageObject;
import org.eclipse.rse.model.SystemRemoteResourceSet; import org.eclipse.rse.model.SystemRemoteResourceSet;
@ -131,7 +131,6 @@ import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI; import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.progress.IElementCollector; 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.IPropertyDescriptor;
import org.eclipse.ui.views.properties.PropertyDescriptor; import org.eclipse.ui.views.properties.PropertyDescriptor;
@ -143,7 +142,7 @@ import org.eclipse.ui.views.properties.PropertyDescriptor;
public class SystemViewRemoteFileAdapter public class SystemViewRemoteFileAdapter
extends AbstractSystemViewAdapter extends AbstractSystemViewAdapter
implements ISystemViewElementAdapter, ISystemRemoteElementAdapter, implements ISystemViewElementAdapter, ISystemRemoteElementAdapter,
ISystemMessages, ISystemPropertyConstants ISystemPropertyConstants
{ {
private String xlatedSize = null; private String xlatedSize = null;
@ -733,13 +732,13 @@ public class SystemViewRemoteFileAdapter
catch (InterruptedException exc) catch (InterruptedException exc)
{ {
children = new SystemMessageObject[1]; 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."); //System.out.println("Canceled.");
} }
catch (Exception exc) catch (Exception exc)
{ {
children = new SystemMessageObject[1]; 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); SystemBasePlugin.logError("Exception resolving file filter strings", exc);
} // message already issued } // message already issued
} }
@ -1502,13 +1501,12 @@ public class SystemViewRemoteFileAdapter
Display display = Display.getCurrent(); Display display = Display.getCurrent();
if (display != null) if (display != null)
{ {
while (display.readAndDispatch()); while (display.readAndDispatch()) {
try try {
{ Thread.sleep(100);
Thread.sleep(100); } catch (InterruptedException e) {
} break;
catch (Exception e) }
{
} }
} }
} }
@ -1518,7 +1516,7 @@ public class SystemViewRemoteFileAdapter
{ {
Thread.sleep(100); Thread.sleep(100);
} }
catch (Exception e) catch (InterruptedException e)
{ {
} }
} }
@ -2425,7 +2423,7 @@ public class SystemViewRemoteFileAdapter
{ {
// update all tree views showing this remote folder... // 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... // 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.fireEvent(event);
//sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, file, file.getParentRemoteFile(), file.getParentRemoteFileSubSystem(), null, null); //sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, file, file.getParentRemoteFile(), file.getParentRemoteFileSubSystem(), null, null);
} }

View file

@ -70,7 +70,7 @@ import org.eclipse.swt.widgets.Shell;
* To listen for changes, use addSelectionListener(). * To listen for changes, use addSelectionListener().
*/ */
public class SystemQualifiedRemoteFolderCombo extends Composite public class SystemQualifiedRemoteFolderCombo extends Composite
implements ISystemMessages, ISystemCombo implements ISystemCombo
{ {
public static final char CONNECTION_DELIMITER = IRemoteFile.CONNECTION_DELIMITER; public static final char CONNECTION_DELIMITER = IRemoteFile.CONNECTION_DELIMITER;
private Label folderLabel = null; private Label folderLabel = null;
@ -570,7 +570,7 @@ public class SystemQualifiedRemoteFolderCombo extends Composite
ISystemProfile profile = sr.getSystemProfile(profileName); ISystemProfile profile = sr.getSystemProfile(profileName);
if (profile == null) if (profile == null)
{ {
msg = RSEUIPlugin.getPluginMessage(MSG_ERROR_PROFILE_NOTFOUND); msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_PROFILE_NOTFOUND);
msg.makeSubstitution(profileName); msg.makeSubstitution(profileName);
throw new Exception(msg.getLevelOneText()); throw new Exception(msg.getLevelOneText());
} }
@ -579,7 +579,7 @@ public class SystemQualifiedRemoteFolderCombo extends Composite
IHost conn = RSEUIPlugin.getTheSystemRegistry().getHost(profile,connName); IHost conn = RSEUIPlugin.getTheSystemRegistry().getHost(profile,connName);
if (conn == null) if (conn == null)
{ {
msg = RSEUIPlugin.getPluginMessage(MSG_ERROR_CONNECTION_NOTFOUND); msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_CONNECTION_NOTFOUND);
msg.makeSubstitution(connName); msg.makeSubstitution(connName);
throw new Exception(msg.getLevelOneText()); throw new Exception(msg.getLevelOneText());
} }
@ -594,7 +594,7 @@ public class SystemQualifiedRemoteFolderCombo extends Composite
if (filesubsystems.length == 0) 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); msg.makeSubstitution(connName);
throw new Exception(msg.getLevelOneText()); throw new Exception(msg.getLevelOneText());
} }
@ -606,12 +606,12 @@ public class SystemQualifiedRemoteFolderCombo extends Composite
ss.connect(getShell()); // will throw exception if fails. ss.connect(getShell()); // will throw exception if fails.
} catch (InterruptedException exc) } catch (InterruptedException exc)
{ {
msg = RSEUIPlugin.getPluginMessage(MSG_CONNECT_CANCELLED); msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_CANCELLED);
msg.makeSubstitution(conn.getHostName()); msg.makeSubstitution(conn.getHostName());
throw new Exception(msg.getLevelOneText()); throw new Exception(msg.getLevelOneText());
} catch (Exception exc) } catch (Exception exc)
{ {
msg = RSEUIPlugin.getPluginMessage(MSG_CONNECT_FAILED); msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED);
msg.makeSubstitution(conn.getHostName()); msg.makeSubstitution(conn.getHostName());
throw new Exception(msg.getLevelOneText()); throw new Exception(msg.getLevelOneText());
} }

View file

@ -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.subsystems.IRemoteFileSubSystemConfiguration;
import org.eclipse.rse.subsystems.files.core.util.SystemRemoteFileMatcher; import org.eclipse.rse.subsystems.files.core.util.SystemRemoteFileMatcher;
import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemIconConstants;
import org.eclipse.rse.ui.ISystemMessages;
import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.SystemWidgetHelpers;
import org.eclipse.rse.ui.dialogs.SystemPromptDialog; import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
@ -99,7 +98,7 @@ import org.eclipse.swt.widgets.Text;
* </ul> * </ul>
*/ */
public class SystemSelectRemoteFileOrFolderForm 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. 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); setSystemConnection(connection);
setShowNewConnectionPrompt(false); setShowNewConnectionPrompt(false);
setAutoExpandDepth(1); setAutoExpandDepth(1);
ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); //ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(connection); IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(connection);
IRemoteFileSubSystemConfiguration ssf = ss.getParentRemoteFileSubSystemConfiguration(); IRemoteFileSubSystemConfiguration ssf = ss.getParentRemoteFileSubSystemConfiguration();
RemoteFileFilterString rffs = new RemoteFileFilterString(ssf); RemoteFileFilterString rffs = new RemoteFileFilterString(ssf);

View file

@ -23,8 +23,6 @@ import org.eclipse.rse.ui.SystemWidgetHelpers;
import org.eclipse.rse.ui.validators.ISystemValidator; import org.eclipse.rse.ui.validators.ISystemValidator;
import org.eclipse.rse.ui.validators.ValidatorServerPortInput; import org.eclipse.rse.ui.validators.ValidatorServerPortInput;
import org.eclipse.rse.ui.wizards.AbstractSystemNewConnectionWizardPage; 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.ModifyEvent;
import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Composite;

View file

@ -19,7 +19,6 @@ package org.eclipse.rse.files.ui.wizards;
import java.util.Vector; import java.util.Vector;
import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.SystemBasePlugin;
import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.FileResources;
@ -50,7 +49,6 @@ import org.eclipse.rse.ui.wizards.AbstractSystemWizard;
public class SystemNewFileWizard public class SystemNewFileWizard
extends AbstractSystemWizard extends AbstractSystemWizard
implements ISystemMessages
{ {
private SystemNewFileWizardMainPage mainPage; private SystemNewFileWizardMainPage mainPage;
@ -79,7 +77,7 @@ public class SystemNewFileWizard
{ {
try { try {
mainPage = createMainPage(); mainPage = createMainPage();
addPage((WizardPage)mainPage); addPage(mainPage);
//super.addPages(); //super.addPages();
} catch (Exception exc) } catch (Exception exc)
{ {
@ -175,12 +173,12 @@ public class SystemNewFileWizard
newFile = rfss.createFile(newFilePath); newFile = rfss.createFile(newFilePath);
} catch (RemoteFileIOException exc ) { } catch (RemoteFileIOException exc ) {
SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileIOException " ); 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); mainPage.setMessage(msg);
ok = false; ok = false;
//DY } catch (Exception RemoteFileSecurityException) { //DY } catch (Exception RemoteFileSecurityException) {
} catch (RemoteFileSecurityException e) { } 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 "); SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileSecurityException ");
//SystemMessage.displayErrorMessage(SystemMessage.getDefaultShell(), msg); //SystemMessage.displayErrorMessage(SystemMessage.getDefaultShell(), msg);
mainPage.setMessage(msg); mainPage.setMessage(msg);

View file

@ -46,7 +46,6 @@ import org.eclipse.swt.widgets.Text;
public class SystemNewFileWizardMainPage public class SystemNewFileWizardMainPage
extends AbstractSystemWizardPage extends AbstractSystemWizardPage
implements ISystemMessages
{ {
protected String fileNameStr; 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; return composite_prompts;

View file

@ -16,7 +16,6 @@
package org.eclipse.rse.files.ui.wizards; package org.eclipse.rse.files.ui.wizards;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.SystemBasePlugin;
import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.FileResources;
import org.eclipse.rse.filters.ISystemFilter; import org.eclipse.rse.filters.ISystemFilter;
@ -36,7 +35,6 @@ import org.eclipse.rse.ui.wizards.AbstractSystemWizard;
public class SystemNewFolderWizard public class SystemNewFolderWizard
extends AbstractSystemWizard extends AbstractSystemWizard
implements ISystemMessages
{ {
private SystemNewFolderWizardMainPage mainPage; private SystemNewFolderWizardMainPage mainPage;
@ -64,7 +62,7 @@ public class SystemNewFolderWizard
{ {
try { try {
mainPage = createMainPage(); mainPage = createMainPage();
addPage((WizardPage)mainPage); addPage(mainPage);
//super.addPages(); //super.addPages();
} catch (Exception exc) } catch (Exception exc)
{ {
@ -166,14 +164,14 @@ public class SystemNewFolderWizard
} }
else 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); mainPage.setMessage(msg);
ok = false; ok = false;
// DY } catch (Exception RemoteFileSecurityException) { // DY } catch (Exception RemoteFileSecurityException) {
} catch (RemoteFileSecurityException e) { } catch (RemoteFileSecurityException e) {
SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileSecurityException "); 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); //SystemMessage.displayErrorMessage(SystemMessage.getDefaultShell(), msg);
mainPage.setMessage(msg); mainPage.setMessage(msg);
ok = false; ok = false;

View file

@ -47,7 +47,6 @@ import org.eclipse.swt.widgets.Text;
public class SystemNewFolderWizardMainPage public class SystemNewFolderWizardMainPage
extends AbstractSystemWizardPage extends AbstractSystemWizardPage
implements ISystemMessages
{ {
protected String fileNameStr; 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; return composite_prompts;

View file

@ -54,7 +54,7 @@ import org.eclipse.swt.widgets.Text;
public class SystemProcessFilterStringEditPane extends public class SystemProcessFilterStringEditPane extends
SystemFilterStringEditPane implements ISystemMessages, ISystemProcessRemoteConstants SystemFilterStringEditPane implements ISystemProcessRemoteConstants
{ {
// GUI widgets // GUI widgets
@ -475,7 +475,7 @@ public class SystemProcessFilterStringEditPane extends
notUnique = true; notUnique = true;
if (notUnique) if (notUnique)
{ {
errorMessage = RSEUIPlugin.getPluginMessage(FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE).makeSubstitution(currFilterString); errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE).makeSubstitution(currFilterString);
} }
controlInError = txtExeName; controlInError = txtExeName;
} }

View file

@ -16,7 +16,6 @@
package org.eclipse.rse.processes.ui.view; package org.eclipse.rse.processes.ui.view;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.core.runtime.IAdapterManager; import org.eclipse.core.runtime.IAdapterManager;
import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.SystemBasePlugin;
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess; import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;

View file

@ -48,7 +48,7 @@ import org.eclipse.ui.views.properties.PropertyDescriptor;
public class SystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter public class SystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
implements ISystemViewElementAdapter, ISystemRemoteElementAdapter, ISystemMessages, implements ISystemViewElementAdapter, ISystemRemoteElementAdapter,
ISystemProcessPropertyConstants, ISystemProcessRemoteConstants ISystemProcessPropertyConstants, ISystemProcessRemoteConstants
{ {
private SystemCopyToClipboardAction copyClipboardAction; private SystemCopyToClipboardAction copyClipboardAction;
@ -180,7 +180,7 @@ public class SystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
catch (Exception exc) catch (Exception exc)
{ {
children = new SystemMessageObject[1]; 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); SystemBasePlugin.logError("Exception resolving file filter strings", exc);
} }
return children; return children;

View file

@ -51,7 +51,7 @@ public abstract class SystemBaseShellAction extends SystemBaseAction
public boolean updateSelection(IStructuredSelection selection) public boolean updateSelection(IStructuredSelection selection)
{ {
boolean enable = false; boolean enable = false;
Iterator e = ((IStructuredSelection) selection).iterator(); Iterator e = selection.iterator();
_selected.clear(); _selected.clear();
while (e.hasNext()) while (e.hasNext())
{ {

View file

@ -69,7 +69,7 @@ public class SystemCommandAction extends SystemBaseAction
/** /**
* The command dialog used when running a command. * The command dialog used when running a command.
*/ */
public class CommandDialog extends SystemPromptDialog implements ISystemMessages public class CommandDialog extends SystemPromptDialog
{ {
private Combo _cmdText; private Combo _cmdText;
private Button _launchNewShellButton; private Button _launchNewShellButton;
@ -187,7 +187,7 @@ public class SystemCommandAction extends SystemBaseAction
if (theNewName.length() == 0) if (theNewName.length() == 0)
{ {
_errorMessage = RSEUIPlugin.getPluginMessage(MSG_UCMD_INVOCATION_EMPTY); _errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UCMD_INVOCATION_EMPTY);
} }
if (_errorMessage != null) if (_errorMessage != null)
@ -528,7 +528,7 @@ public class SystemCommandAction extends SystemBaseAction
{ {
boolean enable = false; boolean enable = false;
Iterator e = ((IStructuredSelection) selection).iterator(); Iterator e = selection.iterator();
Object selected = e.next(); Object selected = e.next();
if (selected != null) if (selected != null)