diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/LocalConnectorService.java b/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/LocalConnectorService.java index 7866ff9917d..12195e714d7 100644 --- a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/LocalConnectorService.java +++ b/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/LocalConnectorService.java @@ -16,10 +16,10 @@ package org.eclipse.rse.connectorservice.local; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.subsystems.AbstractConnectorService; import org.eclipse.rse.core.subsystems.CommunicationsEvent; -import org.eclipse.rse.model.IHost; - + /** * System class required by the remote systems framework. * This represents the live connection at tool runtime. diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/LocalConnectorServiceManager.java b/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/LocalConnectorServiceManager.java index 9e2fa853468..44a68c5a0ec 100644 --- a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/LocalConnectorServiceManager.java +++ b/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/connectorservice/local/LocalConnectorServiceManager.java @@ -16,10 +16,10 @@ package org.eclipse.rse.connectorservice.local; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager; import org.eclipse.rse.core.subsystems.IConnectorService; import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.model.IHost; /** diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/RSEFileSystem.java b/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/RSEFileSystem.java index db3b3fecbfc..88ab6ed283d 100644 --- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/RSEFileSystem.java +++ b/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/RSEFileSystem.java @@ -24,9 +24,9 @@ import org.eclipse.core.filesystem.IFileStore; import org.eclipse.core.filesystem.provider.FileSystem; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.subsystems.IConnectorService; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem; diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/RSEFileSystemContributor.java b/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/RSEFileSystemContributor.java index 3fb392eadf2..c6674504bcb 100644 --- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/RSEFileSystemContributor.java +++ b/rse/plugins/org.eclipse.rse.eclipse.filesystem/src/org/eclipse/rse/eclipse/filesystem/RSEFileSystemContributor.java @@ -3,11 +3,11 @@ package org.eclipse.rse.eclipse.filesystem; import java.net.URI; import org.eclipse.jface.window.Window; +import org.eclipse.rse.core.filters.ISystemFilterReference; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog; -import org.eclipse.rse.filters.ISystemFilterReference; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem; import org.eclipse.swt.widgets.Shell; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/ISystemAddFileListener.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/ISystemAddFileListener.java index a4dc3e6359c..3b50abeeeb5 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/ISystemAddFileListener.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/ISystemAddFileListener.java @@ -16,7 +16,7 @@ package org.eclipse.rse.files.ui; -import org.eclipse.rse.model.IHost; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; /** 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 75ebcb0ad2e..d04114c3cc7 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 @@ -19,14 +19,14 @@ package org.eclipse.rse.files.ui; import java.util.Vector; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.files.ui.actions.SystemSelectFileTypesAction; import org.eclipse.rse.files.ui.widgets.SystemFileWidgetHelpers; import org.eclipse.rse.files.ui.widgets.SystemRemoteFolderCombo; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.subsystems.files.core.SystemFileResources; import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemAddToArchiveAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemAddToArchiveAction.java index 2a5066d3923..4d758116b4d 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemAddToArchiveAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemAddToArchiveAction.java @@ -27,12 +27,12 @@ import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.resources.AddToArchiveDialog; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemRemoteChangeEvents; import org.eclipse.rse.model.ISystemResourceChangeEvents; +import org.eclipse.rse.model.SystemRegistry; import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager; import org.eclipse.rse.services.clientserver.messages.SystemMessage; @@ -162,7 +162,7 @@ public class SystemAddToArchiveAction extends SystemBaseAction IRemoteFile selection = (IRemoteFile) _selected.get(i); addToArchive(selection, destinationArchive, saveFullPathInfo, relativeTo); } - ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); + SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); registry.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED, destinationArchive, destinationArchive.getParentPath(), destSS, null, null); registry.fireEvent(new SystemResourceChangeEvent(destinationArchive, ISystemResourceChangeEvents.EVENT_REFRESH, destinationArchive.getParentPath())); repeat = false; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCombineAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCombineAction.java index 670114aea86..c314e4a2d0d 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCombineAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCombineAction.java @@ -18,9 +18,9 @@ package org.eclipse.rse.files.ui.actions; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.resources.CombineDialog; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemRemoteChangeEvents; import org.eclipse.rse.model.ISystemResourceChangeEvents; +import org.eclipse.rse.model.SystemRegistry; import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager; import org.eclipse.rse.services.clientserver.messages.SystemMessage; @@ -162,7 +162,7 @@ public class SystemCombineAction extends SystemExtractToAction { { } } - ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); + SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); registry.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED, destination, destination.getParentPath(), destSS, null, null); registry.fireEvent(new SystemResourceChangeEvent(destination, ISystemResourceChangeEvents.EVENT_REFRESH, destination.getParentPath())); repeat = false; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemConvertAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemConvertAction.java index 8d269bee2a2..ef8c3aaad49 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemConvertAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemConvertAction.java @@ -18,9 +18,9 @@ package org.eclipse.rse.files.ui.actions; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.resources.CombineDialog; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemRemoteChangeEvents; import org.eclipse.rse.model.ISystemResourceChangeEvents; +import org.eclipse.rse.model.SystemRegistry; import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager; import org.eclipse.rse.services.clientserver.messages.SystemMessage; @@ -171,7 +171,7 @@ public class SystemConvertAction extends SystemExtractToAction { catch (java.lang.InterruptedException e) { } - ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); + SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); registry.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED, destination, destination.getParentPath(), destSS, null, null); registry.fireEvent(new SystemResourceChangeEvent(destination, ISystemResourceChangeEvents.EVENT_REFRESH, destination.getParentPath())); } 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 cce1f22ee04..59310fabdee 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 @@ -24,12 +24,12 @@ import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.Viewer; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.filters.ISystemFilterReference; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog; import org.eclipse.rse.files.ui.resources.SystemRemoteEditManager; -import org.eclipse.rse.filters.ISystemFilterReference; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.model.ISystemRemoteChangeEvents; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; @@ -39,6 +39,7 @@ 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; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemExtractAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemExtractAction.java index db567731d27..98a59698e31 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemExtractAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemExtractAction.java @@ -27,9 +27,9 @@ import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.rse.files.ui.FileResources; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemRemoteChangeEvents; import org.eclipse.rse.model.ISystemResourceChangeEvents; +import org.eclipse.rse.model.SystemRegistry; import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; @@ -118,7 +118,8 @@ public class SystemExtractAction extends SystemBaseAction { } // always refresh - ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); + + SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); registry.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED, destination, destinationParent, ss, null, null); registry.fireEvent(new SystemResourceChangeEvent(destination, ISystemResourceChangeEvents.EVENT_REFRESH, destinationParent)); } 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 1f4429a9f22..4c5eefd05f2 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 @@ -17,12 +17,12 @@ package org.eclipse.rse.files.ui.actions; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.rse.core.IRSESystemType; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.resources.ExtractToDialog; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemRemoteChangeEvents; import org.eclipse.rse.model.ISystemResourceChangeEvents; +import org.eclipse.rse.model.SystemRegistry; import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; @@ -153,7 +153,7 @@ public class SystemExtractToAction extends SystemExtractAction implements IValid { } // always refresh - ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); + SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); registry.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED, destination, destination.getParentPath(), destSS, null, null); registry.fireEvent(new SystemResourceChangeEvent(destination, ISystemResourceChangeEvents.EVENT_REFRESH, destination.getParentPath())); } 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 74dff3351f1..1048b6b38b8 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 @@ -18,8 +18,8 @@ package org.eclipse.rse.files.ui.actions; import java.util.Vector; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.model.ISystemRemoteChangeEvents; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; @@ -27,6 +27,7 @@ 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; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFileFilterAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFileFilterAction.java index 5f5dc584978..af0e2ad1b58 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFileFilterAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFileFilterAction.java @@ -15,8 +15,8 @@ ********************************************************************************/ package org.eclipse.rse.files.ui.actions; +import org.eclipse.rse.core.filters.ISystemFilterPool; import org.eclipse.rse.files.ui.SystemFileFilterStringEditPane; -import org.eclipse.rse.filters.ISystemFilterPool; import org.eclipse.rse.subsystems.files.core.SystemFileResources; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration; import org.eclipse.rse.ui.ISystemIconConstants; 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 5a74e9cc7b5..ee4b26f6413 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,8 +19,8 @@ package org.eclipse.rse.files.ui.actions; import java.util.Iterator; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider; 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.RemoteFile; 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 5e63c157d8b..955be393e33 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 @@ -16,10 +16,10 @@ package org.eclipse.rse.files.ui.actions; import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.ISystemAddFileListener; import org.eclipse.rse.files.ui.dialogs.SystemRemoteFileDialog; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFileAction.java index 3bc5329671a..8670d97fb33 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFileAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFileAction.java @@ -21,10 +21,10 @@ import java.util.List; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.viewers.ViewerFilter; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.ISystemAddFileListener; import org.eclipse.rse.files.ui.dialogs.SystemSelectRemoteFileOrFolderDialog; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.ui.actions.SystemBaseDialogAction; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFolderAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFolderAction.java index 3240c92b3b8..53e224229d2 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFolderAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFolderAction.java @@ -16,10 +16,10 @@ package org.eclipse.rse.files.ui.actions; import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.ISystemAddFileListener; import org.eclipse.rse.files.ui.dialogs.SystemSelectRemoteFileOrFolderDialog; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.ui.actions.SystemBaseDialogAction; import org.eclipse.rse.ui.validators.IValidatorRemoteSelection; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemPromptForHomeFolderDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemPromptForHomeFolderDialog.java index db4db0f1145..de79f4b2131 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemPromptForHomeFolderDialog.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemPromptForHomeFolderDialog.java @@ -15,10 +15,10 @@ ********************************************************************************/ package org.eclipse.rse.files.ui.dialogs; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.files.ui.widgets.SystemRemoteFolderCombo; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.subsystems.files.core.SystemFileResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.dialogs.SystemPromptDialog; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteArchiveDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteArchiveDialog.java index 3aca11a68f8..9af974d555f 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteArchiveDialog.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteArchiveDialog.java @@ -16,7 +16,7 @@ package org.eclipse.rse.files.ui.dialogs; -import org.eclipse.rse.model.IHost; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.subsystems.files.core.SystemFileResources; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.ui.view.SystemActionViewerFilter; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileDialog.java index 65a4a9b3560..4993d7fd5af 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileDialog.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileDialog.java @@ -16,7 +16,7 @@ package org.eclipse.rse.files.ui.dialogs; -import org.eclipse.rse.model.IHost; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.subsystems.files.core.SystemFileResources; import org.eclipse.rse.ui.dialogs.SystemRemoteResourceDialog; import org.eclipse.rse.ui.view.SystemActionViewerFilter; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileSelectionInputProvider.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileSelectionInputProvider.java index bd66a671c94..718d49c20bb 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileSelectionInputProvider.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileSelectionInputProvider.java @@ -16,8 +16,8 @@ package org.eclipse.rse.files.ui.dialogs; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility; import org.eclipse.rse.ui.view.SystemResourceSelectionInputProvider; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFolderDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFolderDialog.java index 579b6999586..0a96eaf0047 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFolderDialog.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFolderDialog.java @@ -16,7 +16,7 @@ package org.eclipse.rse.files.ui.dialogs; -import org.eclipse.rse.model.IHost; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.subsystems.files.core.SystemFileResources; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.ui.view.SystemActionViewerFilter; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemSelectRemoteFileOrFolderDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemSelectRemoteFileOrFolderDialog.java index 9eca493f3ef..7e4f4032bfc 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemSelectRemoteFileOrFolderDialog.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemSelectRemoteFileOrFolderDialog.java @@ -16,9 +16,9 @@ package org.eclipse.rse.files.ui.dialogs; import org.eclipse.jface.viewers.ViewerFilter; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.files.ui.ISystemAddFileListener; import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.subsystems.files.core.SystemFileResources; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/FileServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/FileServicesPropertyPage.java index d2ee67f68a4..87896b9d489 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/FileServicesPropertyPage.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/FileServicesPropertyPage.java @@ -19,10 +19,10 @@ package org.eclipse.rse.files.ui.propertypages; import java.util.ArrayList; import java.util.List; -import org.eclipse.rse.core.servicesubsystem.IServiceSubSystemConfiguration; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemRegistry; +import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem; import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystemConfiguration; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemAbstractRemoteFilePropertyPageExtensionAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemAbstractRemoteFilePropertyPageExtensionAction.java index 6e51ce5d10c..d4628c6f74b 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemAbstractRemoteFilePropertyPageExtensionAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemAbstractRemoteFilePropertyPageExtensionAction.java @@ -15,10 +15,12 @@ ********************************************************************************/ package org.eclipse.rse.files.ui.propertypages; +import org.eclipse.rse.services.clientserver.messages.SystemMessage; 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.IRemoteFileSubSystemConfiguration; import org.eclipse.rse.ui.propertypages.SystemAbstractPropertyPageExtensionAction; +import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.ui.IWorkbenchPropertyPage; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemCachePreferencePage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemCachePreferencePage.java index 68c05c32d7f..138fc76aaf8 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemCachePreferencePage.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemCachePreferencePage.java @@ -29,14 +29,15 @@ import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.jface.preference.FieldEditorPreferencePage; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.preference.PreferencePage; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.resources.SystemIFileProperties; import org.eclipse.rse.files.ui.resources.SystemRemoteEditManager; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.GenericMessages; import org.eclipse.rse.ui.ISystemMessages; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/CombineForm.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/CombineForm.java index 6d6095e8410..eccb96498fa 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/CombineForm.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/CombineForm.java @@ -20,12 +20,12 @@ import java.util.ArrayList; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.rse.core.SystemAdapterHelpers; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm; -import org.eclipse.rse.filters.ISystemFilter; import org.eclipse.rse.filters.SystemFilterSimple; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.subsystems.files.core.SystemFileResources; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ExtractToForm.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ExtractToForm.java index 88d25aa2791..ea74133d25c 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ExtractToForm.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ExtractToForm.java @@ -18,11 +18,11 @@ package org.eclipse.rse.files.ui.resources; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.rse.core.SystemAdapterHelpers; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm; -import org.eclipse.rse.filters.ISystemFilter; import org.eclipse.rse.filters.SystemFilterSimple; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.subsystems.files.core.SystemFileResources; import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java index 077f902608e..a49911e08ec 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java @@ -37,10 +37,10 @@ import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Status; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.files.ui.actions.SystemDownloadConflictAction; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.services.clientserver.SystemEncodingUtil; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java index 75e45aff1af..62aaedefbf6 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java @@ -32,12 +32,13 @@ import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.filters.ISystemFilterReference; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.files.ui.FileResources; -import org.eclipse.rse.filters.ISystemFilterReference; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemResourceChangeEvents; +import org.eclipse.rse.model.SystemRegistry; import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility; @@ -590,7 +591,7 @@ public abstract class SystemTempFileListener implements IResourceChangeListener protected void refreshRemoteResource(Object parent) { - ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); + SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); // refresh if (parent != null) { diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java index c2c506d497f..92ad609a7d3 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java @@ -22,8 +22,8 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.files.ui.actions.SystemUploadConflictAction; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemResourceChangeEvents; +import org.eclipse.rse.model.SystemRegistry; import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.services.files.RemoteFileIOException; import org.eclipse.rse.services.files.RemoteFileSecurityException; @@ -254,7 +254,7 @@ public class SystemUniversalTempFileListener extends SystemTempFileListener IRemoteFile parent = remoteFile.getParentRemoteFile(); - ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); + SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); // refresh if (parent != null) { diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java index 104917a68bf..18f6ae12a9b 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java @@ -31,11 +31,11 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Path; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.model.SystemWorkspaceResourceSet; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.files.ui.FileResources; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.SystemRemoteResourceSet; import org.eclipse.rse.services.clientserver.SystemEncodingUtil; import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager; @@ -285,7 +285,7 @@ public class UniversalFileTransferUtility && !(srcFileOrFolder.getParentRemoteFileSubSystem().getHost().getSystemType().equals("Local"))) //$NON-NLS-1$ { try - { + { tempFolder = compressedCopyRemoteResourceToWorkspace(srcFileOrFolder, monitor); } catch (Exception e) @@ -448,7 +448,7 @@ public class UniversalFileTransferUtility && !(srcFileOrFolder.getParentRemoteFileSubSystem().getHost().getSystemType().equals("Local"))) //$NON-NLS-1$ { try - { + { tempFolder = compressedCopyRemoteResourceToWorkspace(srcFileOrFolder, monitor); } catch (Exception e) @@ -564,13 +564,13 @@ public class UniversalFileTransferUtility * @param targetFolder the object to be copied to. * @param monitor the progress monitor * @return the resulting remote object - */ + */ public static Object copyWorkspaceResourceToRemote(IResource srcFileOrFolder, IRemoteFile targetFolder, IProgressMonitor monitor) { return copyWorkspaceResourceToRemote(srcFileOrFolder, targetFolder, monitor, true); } - /** +/** * Perform a copy via drag and drop. * @param workspaceSet the objects to be copied. If the target and sources are not on the same system, then this is a * temporary object produced by the doDrag. @@ -741,7 +741,7 @@ public class UniversalFileTransferUtility newTargetFolder = targetFS.createFolder(newTargetFolder); } - + boolean isTargetLocal = newTargetFolder.getParentRemoteFileSubSystem().getHost().getSystemType().equals("Local"); //$NON-NLS-1$ boolean destInArchive = (newTargetFolder instanceof IVirtualRemoteFile) || newTargetFolder.isArchive(); @@ -939,7 +939,7 @@ public class UniversalFileTransferUtility } directory.refreshLocal(IResource.DEPTH_ONE, monitor); - + boolean isTargetLocal = newTargetFolder.getParentRemoteFileSubSystem().getHost().getSystemType().equals("Local"); //$NON-NLS-1$ boolean destInArchive = (newTargetFolder instanceof IVirtualRemoteFile) || newTargetFolder.isArchive(); boolean doSuperTransferPreference = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER); diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/search/SystemSearchPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/search/SystemSearchPage.java index 5e6a8d49272..2b4be7fe815 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/search/SystemSearchPage.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/search/SystemSearchPage.java @@ -29,11 +29,11 @@ import org.eclipse.jface.text.ITextSelection; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemProfile; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.actions.SystemSelectRemoteFolderAction; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemProfile; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.services.clientserver.SystemSearchString; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/RemoteFileSubSystemConfigurationAdapter.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/RemoteFileSubSystemConfigurationAdapter.java index ccacc8e04f8..0a530b90f77 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/RemoteFileSubSystemConfigurationAdapter.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/RemoteFileSubSystemConfigurationAdapter.java @@ -25,6 +25,10 @@ import org.eclipse.core.resources.IResource; import org.eclipse.jface.action.IAction; import org.eclipse.jface.wizard.IWizard; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.files.ui.actions.SystemFileUpdateFilterAction; import org.eclipse.rse.files.ui.actions.SystemNewFileAction; @@ -33,14 +37,10 @@ import org.eclipse.rse.files.ui.actions.SystemNewFolderAction; import org.eclipse.rse.files.ui.resources.SystemIFileProperties; import org.eclipse.rse.files.ui.resources.SystemRemoteEditManager; import org.eclipse.rse.files.ui.wizards.SystemFileNewConnectionWizardPage; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction; import org.eclipse.rse.ui.view.SubSystemConfigurationAdapter; -import org.eclipse.rse.ui.wizards.ISystemNewConnectionWizardPage; import org.eclipse.swt.dnd.Clipboard; import org.eclipse.swt.widgets.Shell; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewFileAdapterFactory.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewFileAdapterFactory.java index 8195dfc0516..3d2295df975 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewFileAdapterFactory.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewFileAdapterFactory.java @@ -15,6 +15,7 @@ ********************************************************************************/ package org.eclipse.rse.files.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.files.core.subsystems.IRemoteFile; 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 a46254dd65f..05dc99ceae0 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 @@ -40,7 +40,10 @@ import org.eclipse.jface.viewers.AbstractTreeViewer; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.Viewer; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.filters.ISystemFilterReference; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.model.ISystemMessageObject; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.model.ISystemResourceSet; import org.eclipse.rse.core.model.SystemMessageObject; import org.eclipse.rse.core.model.SystemWorkspaceResourceSet; @@ -66,11 +69,9 @@ import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile; import org.eclipse.rse.files.ui.resources.SystemIFileProperties; import org.eclipse.rse.files.ui.resources.SystemRemoteEditManager; import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility; -import org.eclipse.rse.filters.ISystemFilterReference; import org.eclipse.rse.filters.SystemFilterReference; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemResourceChangeEvents; +import org.eclipse.rse.model.SystemRegistry; import org.eclipse.rse.model.SystemRemoteResourceSet; import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.services.clientserver.StringCompare; @@ -233,10 +234,10 @@ public class SystemViewRemoteFileAdapter */ public void setFilterString(String filterString) { - if (filesOnly && (filterString != null) && (filterString.indexOf("/ns") == -1)) //$NON-NLS-1$ - filterString = filterString + " /ns"; //$NON-NLS-1$ - else if (foldersOnly && (filterString != null) && (filterString.indexOf("/nf") == -1)) //$NON-NLS-1$ - filterString = filterString + " /nf"; //$NON-NLS-1$ + if (filesOnly && (filterString != null) && (filterString.indexOf("/ns") == -1)) + filterString = filterString + " /ns"; + else if (foldersOnly && (filterString != null) && (filterString.indexOf("/nf") == -1)) + filterString = filterString + " /nf"; this.filterString = filterString; } @@ -577,7 +578,7 @@ public class SystemViewRemoteFileAdapter */ public String getStatusLineText(Object element) { - return getType(element) + ": " + getAbsoluteName(element); //$NON-NLS-1$ + return getType(element) + ": " + getAbsoluteName(element); } /** @@ -658,21 +659,21 @@ public class SystemViewRemoteFileAdapter else if (foldersOnly) { if (filterString == null) - filter = "* /nf"; //$NON-NLS-1$ + filter = "* /nf"; else filter = filterString; } else if (filesOnly) { if (filterString == null) - filter = "* /ns"; //$NON-NLS-1$ + filter = "* /ns"; else filter = filterString; } else { if (filterString == null) - filter = "*"; //$NON-NLS-1$ + filter = "*"; else filter = filterString; } @@ -967,20 +968,20 @@ public class SystemViewRemoteFileAdapter if (debug) { - propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTREMOTEFILE"); //$NON-NLS-1$ - briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTREMOTEFILE"); //$NON-NLS-1$ - propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENT"); //$NON-NLS-1$ - briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENT"); //$NON-NLS-1$ - propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTNOROOT"); //$NON-NLS-1$ - briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTNOROOT"); //$NON-NLS-1$ - propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTNAME"); //$NON-NLS-1$ - briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTNAME"); //$NON-NLS-1$ - propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_ROOT"); //$NON-NLS-1$ - briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_ROOT"); //$NON-NLS-1$ - propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_ISROOT"); //$NON-NLS-1$ - briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_ISROOT"); //$NON-NLS-1$ - propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_EXISTS"); //$NON-NLS-1$ - briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_EXISTS"); //$NON-NLS-1$ + propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTREMOTEFILE"); + briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTREMOTEFILE"); + propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENT"); + briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENT"); + propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTNOROOT"); + briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTNOROOT"); + propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_PARENTNAME"); + briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_PARENTNAME"); + propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_ROOT"); + briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_ROOT"); + propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_ISROOT"); + briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_ISROOT"); + propertyDescriptorArray[++idx] = createSimplePropertyDescriptor("DEBUG_EXISTS"); + briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor("DEBUG_EXISTS"); } if (isVirtual) @@ -1069,26 +1070,26 @@ public class SystemViewRemoteFileAdapter } if (debug) { - if (name.equals("DEBUG_PARENTREMOTEFILE")) //$NON-NLS-1$ + if (name.equals("DEBUG_PARENTREMOTEFILE")) { IRemoteFile parent = file.getParentRemoteFile(); if (parent == null) - return "null"; //$NON-NLS-1$ + return "null"; else - return "absPath='" + parent.getAbsolutePath() + "'"; //$NON-NLS-1$ //$NON-NLS-2$ + return "absPath='" + parent.getAbsolutePath() + "'"; } - else if (name.equals("DEBUG_PARENT")) //$NON-NLS-1$ + else if (name.equals("DEBUG_PARENT")) return file.getParentPath(); - else if (name.equals("DEBUG_PARENTNOROOT")) //$NON-NLS-1$ + else if (name.equals("DEBUG_PARENTNOROOT")) return file.getParentNoRoot(); - else if (name.equals("DEBUG_PARENTNAME")) //$NON-NLS-1$ + else if (name.equals("DEBUG_PARENTNAME")) return file.getParentName(); - else if (name.equals("DEBUG_ROOT")) //$NON-NLS-1$ + else if (name.equals("DEBUG_ROOT")) return file.getRoot(); - else if (name.equals("DEBUG_ISROOT")) //$NON-NLS-1$ - return file.isRoot() ? "true" : "false"; //$NON-NLS-1$ //$NON-NLS-2$ - else if (name.equals("DEBUG_EXISTS")) //$NON-NLS-1$ - return file.exists() ? "true" : "false"; //$NON-NLS-1$ //$NON-NLS-2$ + else if (name.equals("DEBUG_ISROOT")) + return file.isRoot() ? "true" : "false"; + else if (name.equals("DEBUG_EXISTS")) + return file.exists() ? "true" : "false"; } // @@ -1182,7 +1183,7 @@ public class SystemViewRemoteFileAdapter } else if (name.equals(ISystemPropertyConstants.P_VIRTUAL_COMPRESSIONMETHOD)) { - if (!isVirtual) return ""; //$NON-NLS-1$ + if (!isVirtual) return ""; return virtualFile.getCompressionMethod(); } else if (name.equals(ISystemPropertyConstants.P_VIRTUAL_COMPRESSIONRATIO)) @@ -1368,6 +1369,7 @@ public class SystemViewRemoteFileAdapter * set. For optimal performance, this should be overridden. * * @param set the set of objects to copy + * @param sameSystemType indication of whether the source and target reside on the same type of system * @param monitor the progress monitor * @return a temporary workspace copies of the object that was copied * @@ -1431,7 +1433,7 @@ public class SystemViewRemoteFileAdapter { IHost connection = connections[i]; IRemoteFileSubSystem anFS = RemoteFileUtility.getFileSubSystem(connection); - if (anFS.getHost().getSystemType().equals("Local")) //$NON-NLS-1$ + if (anFS.getHost().getSystemType().equals("Local")) { return anFS; } @@ -1453,7 +1455,7 @@ public class SystemViewRemoteFileAdapter { FileServiceSubSystem ss = (FileServiceSubSystem)subsys; - SystemSearchString searchString = new SystemSearchString("*", false, false, "*", false, false, true); //$NON-NLS-1$ //$NON-NLS-2$ + SystemSearchString searchString = new SystemSearchString("*", false, false, "*", false, false, true); for (int i = 0; i < initialResources.size(); i++) { @@ -1625,8 +1627,8 @@ public class SystemViewRemoteFileAdapter /** * Perform drop from the "fromSet" of objects to the "to" object - * @param fromSet the source objects for the drop - * @param target the target object for the drop + * @param from the source objects for the drop + * @param to the target object for the drop * @param sameSystemType indication of whether the source and target reside of the same type of system * @param sameSystem indication of whether the source and target are on the same system * @param srcType the type of objects to be dropped @@ -1884,7 +1886,7 @@ public class SystemViewRemoteFileAdapter * temporary object produced by the doDrag. * @param target the object to be copied to. * @param sameSystem an indication whether the target and source reside on the same type of system - * @param sourceType type of source being transferred + * @param srcType type of source being transferred * @param monitor the progress monitor * @return an indication whether the operation was successful or not. */ @@ -2355,7 +2357,7 @@ public class SystemViewRemoteFileAdapter for (int i = 0; i < members.length; i++) { IResource member = members[i]; - moveTempFileProperties(member, ss, remotePath + "/" + member.getName()); //$NON-NLS-1$ + moveTempFileProperties(member, ss, remotePath + "/" + member.getName()); } } catch (Exception e) @@ -2395,11 +2397,11 @@ public class SystemViewRemoteFileAdapter boolean ok = true; IRemoteFile file = (IRemoteFile) element; IRemoteFileSubSystem ss = file.getParentRemoteFileSubSystem(); - ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); + SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); try { - String newRemotePath = file.getParentPath() + "/" + newName; //$NON-NLS-1$ + String newRemotePath = file.getParentPath() + "/" + newName; IResource localResource = null; if (SystemRemoteEditManager.getDefault().doesRemoteEditProjectExist()) { @@ -2606,9 +2608,9 @@ public class SystemViewRemoteFileAdapter { srcType = file.getExtension(); if (srcType == null) - srcType = "blank"; //$NON-NLS-1$ + srcType = "blank"; else if (srcType.length() == 0) - srcType = "null"; //$NON-NLS-1$ + srcType = "null"; } return srcType; } @@ -2827,7 +2829,7 @@ public class SystemViewRemoteFileAdapter IRemoteFile remoteFile = (IRemoteFile) object; if (remoteFile.isDirectory()) { - return remoteFile.getAbsolutePath() + remoteFile.getSeparator() + "*"; //$NON-NLS-1$ + return remoteFile.getAbsolutePath() + remoteFile.getSeparator() + "*"; } else { @@ -2880,7 +2882,7 @@ public class SystemViewRemoteFileAdapter String inName = name.toLowerCase(); - if (inName.equals("classification")) //$NON-NLS-1$ + if (inName.equals("classification")) { String classification = tgt.getClassification(); @@ -2889,7 +2891,7 @@ public class SystemViewRemoteFileAdapter return StringCompare.compare(value, classification, true); } } - else if (inName.equals("name")) //$NON-NLS-1$ + else if (inName.equals("name")) { boolean caseSensitive = tgt.getParentRemoteFileSubSystem().isCaseSensitive(); @@ -2903,14 +2905,14 @@ public class SystemViewRemoteFileAdapter } // we have a wild card test, and * is the last character in the value - if (val.endsWith("*")) { //$NON-NLS-1$ + if (val.endsWith("*")) { return tgtName.startsWith(val.substring(0, val.length()-1)); } else { return val.equals(tgtName); } } - else if (inName.equals("absolutePath".toLowerCase())) { //$NON-NLS-1$ + else if (inName.equals("absolutePath".toLowerCase())) { boolean caseSensitive = tgt.getParentRemoteFileSubSystem().isCaseSensitive(); @@ -2924,14 +2926,14 @@ public class SystemViewRemoteFileAdapter } // we have a wild card test, and * is the last character in the value - if (val.endsWith("*")) { //$NON-NLS-1$ + if (val.endsWith("*")) { return tgtPath.startsWith(val.substring(0, val.length()-1)); } else { return val.equals(tgtPath); } } - else if (inName.equals("extension")) { //$NON-NLS-1$ + else if (inName.equals("extension")) { boolean caseSensitive = tgt.getParentRemoteFileSubSystem().isCaseSensitive(); @@ -2941,7 +2943,7 @@ public class SystemViewRemoteFileAdapter return false; } - StringTokenizer st = new StringTokenizer(value, " \t\n\r\f,"); //$NON-NLS-1$ + StringTokenizer st = new StringTokenizer(value, " \t\n\r\f,"); String val = null; @@ -2959,7 +2961,7 @@ public class SystemViewRemoteFileAdapter // we have a wild card test, and * is the last character in // the value - if (val.endsWith("*")) { //$NON-NLS-1$ + if (val.endsWith("*")) { match = tgtExtension.startsWith(val.substring(0, val.length() - 1)); } else { @@ -2975,64 +2977,64 @@ public class SystemViewRemoteFileAdapter // return false if no match return false; } - else if (inName.equals("isroot")) //$NON-NLS-1$ + else if (inName.equals("isroot")) { - return tgt.isRoot() && value.equals("true") || //$NON-NLS-1$ - !tgt.isRoot() && value.equals("false"); //$NON-NLS-1$ + return tgt.isRoot() && value.equals("true") || + !tgt.isRoot() && value.equals("false"); } - else if (inName.equals("isfile")) //$NON-NLS-1$ + else if (inName.equals("isfile")) { - return tgt.isFile() && value.equals("true") || //$NON-NLS-1$ - !tgt.isFile() && value.equals("false"); //$NON-NLS-1$ + return tgt.isFile() && value.equals("true") || + !tgt.isFile() && value.equals("false"); } - else if (inName.equals("isdirectory")) //$NON-NLS-1$ + else if (inName.equals("isdirectory")) { - return tgt.isDirectory() && value.equals("true") || //$NON-NLS-1$ - !tgt.isDirectory() && value.equals("false"); //$NON-NLS-1$ + return tgt.isDirectory() && value.equals("true") || + !tgt.isDirectory() && value.equals("false"); } - else if (inName.equals("ishidden")) //$NON-NLS-1$ + else if (inName.equals("ishidden")) { - return tgt.isHidden() && value.equals("true") || //$NON-NLS-1$ - !tgt.isHidden() && value.equals("false"); //$NON-NLS-1$ + return tgt.isHidden() && value.equals("true") || + !tgt.isHidden() && value.equals("false"); } - else if (inName.equals("canread")) //$NON-NLS-1$ + else if (inName.equals("canread")) { - return tgt.canRead() && value.equals("true") || //$NON-NLS-1$ - !tgt.canRead() && value.equals("false"); //$NON-NLS-1$ + return tgt.canRead() && value.equals("true") || + !tgt.canRead() && value.equals("false"); } - else if (inName.equals("canwrite")) //$NON-NLS-1$ + else if (inName.equals("canwrite")) { - return tgt.canWrite() && value.equals("true") || //$NON-NLS-1$ - !tgt.canWrite() && value.equals("false"); //$NON-NLS-1$ + return tgt.canWrite() && value.equals("true") || + !tgt.canWrite() && value.equals("false"); } - else if (inName.equals("isbinary")) //$NON-NLS-1$ + else if (inName.equals("isbinary")) { - return tgt.isBinary() && value.equals("true") || //$NON-NLS-1$ - !tgt.isBinary() && value.equals("false"); //$NON-NLS-1$ + return tgt.isBinary() && value.equals("true") || + !tgt.isBinary() && value.equals("false"); } - else if (inName.equals("istext")) //$NON-NLS-1$ + else if (inName.equals("istext")) { - return tgt.isText() && value.equals("true") || //$NON-NLS-1$ - !tgt.isText() && value.equals("false"); //$NON-NLS-1$ + return tgt.isText() && value.equals("true") || + !tgt.isText() && value.equals("false"); } else if (inName.equals("isarchive")) { - return tgt.isArchive() && value.equals("true") || //$NON-NLS-1$ - !tgt.isArchive() && value.equals("false"); //$NON-NLS-1$ + return tgt.isArchive() && value.equals("true") || + !tgt.isArchive() && value.equals("false"); } - else if (inName.equals("isvirtual")) //$NON-NLS-1$ + else if (inName.equals("isvirtual")) { - return tgt instanceof IVirtualRemoteFile && value.equals("true") || //$NON-NLS-1$ - !(tgt instanceof IVirtualRemoteFile) && value.equals("false"); //$NON-NLS-1$ + return tgt instanceof IVirtualRemoteFile && value.equals("true") || + !(tgt instanceof IVirtualRemoteFile) && value.equals("false"); } - else if (inName.equals("isexecutable")) //$NON-NLS-1$ + else if (inName.equals("isexecutable")) { - return tgt.isExecutable() && value.equals("true") || //$NON-NLS-1$ - !tgt.isExecutable() && value.equals("false"); //$NON-NLS-1$ + return tgt.isExecutable() && value.equals("true") || + !tgt.isExecutable() && value.equals("false"); } - else if (inName.equals("islink")) //$NON-NLS-1$ + else if (inName.equals("islink")) { - return tgt.isLink() && value.equals("true") || //$NON-NLS-1$ - !tgt.isLink() && value.equals("false"); //$NON-NLS-1$ + return tgt.isLink() && value.equals("true") || + !tgt.isLink() && value.equals("false"); } } 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 c936ee67a5c..5ce59c5bc8b 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 @@ -19,11 +19,11 @@ import java.util.Hashtable; import java.util.ResourceBundle; import org.eclipse.rse.core.SystemPreferencesManager; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemProfile; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.files.ui.actions.SystemSelectRemoteFolderAction; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemProfile; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.subsystems.files.core.SystemFileResources; import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteConnectionCombo.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteConnectionCombo.java index 7aae6c6305d..4c133867b13 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteConnectionCombo.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteConnectionCombo.java @@ -16,7 +16,7 @@ package org.eclipse.rse.files.ui.widgets; import org.eclipse.rse.core.IRSESystemType; -import org.eclipse.rse.model.IHost; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.ui.widgets.SystemHostCombo; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteFolderCombo.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteFolderCombo.java index 3a4512057aa..f78d7c0ace3 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteFolderCombo.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteFolderCombo.java @@ -21,8 +21,8 @@ import java.util.Vector; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.SystemPreferencesManager; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.files.ui.actions.SystemSelectRemoteFolderAction; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.subsystems.files.core.SystemFileResources; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; 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 a2f0fbedff3..dafea568b64 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 @@ -29,11 +29,11 @@ import org.eclipse.jface.wizard.WizardPage; import org.eclipse.rse.core.SystemAdapterHelpers; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.SystemRemoteObjectMatcher; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.files.ui.ISystemAddFileListener; -import org.eclipse.rse.filters.ISystemFilter; import org.eclipse.rse.filters.SystemFilterSimple; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.subsystems.files.core.SystemFileResources; import org.eclipse.rse.subsystems.files.core.model.ISystemFileRemoteTypes; 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 b0ea9d9124c..a90a22eb911 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,6 +23,8 @@ 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 2340a7550c5..5819cbe6c9b 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 @@ -20,14 +20,14 @@ import java.util.Vector; import org.eclipse.jface.viewers.Viewer; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterReference; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.files.ui.FileResources; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterReference; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemRemoteChangeEvents; import org.eclipse.rse.model.ISystemResourceChangeEvents; import org.eclipse.rse.model.ISystemResourceChangeListener; +import org.eclipse.rse.model.SystemRegistry; import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager; import org.eclipse.rse.services.clientserver.messages.SystemMessage; @@ -260,7 +260,7 @@ public class SystemNewFileWizard protected static void updateGUI(IRemoteFile parentFolder, IRemoteFile newFileOrFolder, Viewer viewer, boolean isInputAFilter, ISystemFilterReference selectedFilterRef) { - ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); + SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); if (selectedFilterRef != null) { selectedFilterRef.markStale(true); 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 4a73c40e742..b9a2d9b5300 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 @@ -17,9 +17,9 @@ package org.eclipse.rse.files.ui.wizards; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterReference; import org.eclipse.rse.files.ui.FileResources; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterReference; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.services.files.RemoteFileIOException; diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcess.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcess.java index c635fd2e1ac..a7c0858bd24 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcess.java +++ b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcess.java @@ -20,7 +20,7 @@ package org.eclipse.rse.subsystems.processes.core.subsystem; import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.rse.model.IHost; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.services.clientserver.processes.IHostProcess; import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter; diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessImpl.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessImpl.java index 637b09065d9..8a9400e455b 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessImpl.java +++ b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessImpl.java @@ -18,7 +18,7 @@ package org.eclipse.rse.subsystems.processes.core.subsystem.impl; import org.eclipse.core.runtime.Platform; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.model.IHost; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.services.clientserver.processes.IHostProcess; import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter; diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemConfiguration.java index 7f0ddcffb2c..8a7bbfe433c 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemConfiguration.java +++ b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemConfiguration.java @@ -19,10 +19,10 @@ package org.eclipse.rse.subsystems.processes.core.subsystem.impl; import java.util.Vector; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; import org.eclipse.rse.core.subsystems.SubSystemConfiguration; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl; import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystemConfiguration; import org.eclipse.rse.subsystems.processes.core.subsystem.SystemProcessesCoreResources; diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemImpl.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemImpl.java index 6cb0e21b116..0e82956bd4c 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemImpl.java +++ b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemImpl.java @@ -20,11 +20,11 @@ import java.lang.reflect.InvocationTargetException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.subsystems.CommunicationsEvent; import org.eclipse.rse.core.subsystems.ICommunicationsListener; import org.eclipse.rse.core.subsystems.IConnectorService; import org.eclipse.rse.core.subsystems.SubSystem; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl; import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter; diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystem.java index 68a7b52e39c..23194dfcdbe 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystem.java +++ b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystem.java @@ -16,7 +16,7 @@ package org.eclipse.rse.subsystems.processes.servicesubsystem; -import org.eclipse.rse.core.servicesubsystem.IServiceSubSystem; +import org.eclipse.rse.core.subsystems.IServiceSubSystem; import org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem; diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystemConfiguration.java index d2f87a7ebf9..9adef195435 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystemConfiguration.java +++ b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystemConfiguration.java @@ -16,8 +16,8 @@ package org.eclipse.rse.subsystems.processes.servicesubsystem; -import org.eclipse.rse.core.servicesubsystem.IServiceSubSystemConfiguration; -import org.eclipse.rse.model.IHost; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration; import org.eclipse.rse.services.processes.IProcessService; import org.eclipse.rse.subsystems.processes.core.subsystem.IHostProcessToRemoteProcessAdapter; import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystemConfiguration; diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java index f27986ef948..d57f7eed177 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java +++ b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java @@ -18,9 +18,9 @@ package org.eclipse.rse.subsystems.processes.servicesubsystem; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.servicesubsystem.IServiceSubSystemConfiguration; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.subsystems.IConnectorService; -import org.eclipse.rse.model.IHost; +import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl; import org.eclipse.rse.services.clientserver.processes.IHostProcess; diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystemConfiguration.java index 9ea8a6c995c..306d0b64a37 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystemConfiguration.java +++ b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystemConfiguration.java @@ -19,7 +19,7 @@ package org.eclipse.rse.subsystems.processes.servicesubsystem; import java.util.HashMap; import java.util.Map; -import org.eclipse.rse.model.IHost; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.services.IService; import org.eclipse.rse.services.processes.IProcessService; import org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemConfiguration; diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/DStoreShellSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/DStoreShellSubSystemConfiguration.java index 760a9e1081a..2be13e29f12 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/DStoreShellSubSystemConfiguration.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/DStoreShellSubSystemConfiguration.java @@ -19,9 +19,9 @@ package org.eclipse.rse.subsystems.shells.dstore; import org.eclipse.dstore.core.model.IDataStoreProvider; import org.eclipse.rse.connectorservice.dstore.DStoreConnectorService; import org.eclipse.rse.connectorservice.dstore.DStoreConnectorServiceManager; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.subsystems.IConnectorService; import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.services.dstore.IDStoreService; import org.eclipse.rse.services.dstore.shells.DStoreShellService; import org.eclipse.rse.services.shells.IHostShell; diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/LocalShellSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/LocalShellSubSystemConfiguration.java index b68da9d4feb..c4b3504a475 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/LocalShellSubSystemConfiguration.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/LocalShellSubSystemConfiguration.java @@ -18,9 +18,9 @@ package org.eclipse.rse.subsystems.shells.local; import org.eclipse.rse.connectorservice.local.LocalConnectorService; import org.eclipse.rse.connectorservice.local.LocalConnectorServiceManager; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.subsystems.IConnectorService; import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.services.local.ILocalService; import org.eclipse.rse.services.local.shells.LocalShellService; import org.eclipse.rse.services.shells.IHostShell; diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshShellSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshShellSubSystemConfiguration.java index 027b360dbae..50543a265be 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshShellSubSystemConfiguration.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshShellSubSystemConfiguration.java @@ -18,9 +18,9 @@ package org.eclipse.rse.subsystems.shells.ssh; import org.eclipse.rse.connectorservice.ssh.SshConnectorService; import org.eclipse.rse.connectorservice.ssh.SshConnectorServiceManager; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.subsystems.IConnectorService; import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.services.shells.IHostShell; import org.eclipse.rse.services.shells.IShellService; import org.eclipse.rse.services.ssh.ISshService; diff --git a/rse/plugins/org.eclipse.rse.ui/.classpath b/rse/plugins/org.eclipse.rse.ui/.classpath index fcd17436b57..126e4e7cf77 100644 --- a/rse/plugins/org.eclipse.rse.ui/.classpath +++ b/rse/plugins/org.eclipse.rse.ui/.classpath @@ -1,7 +1,6 @@ - diff --git a/rse/plugins/org.eclipse.rse.ui/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.ui/META-INF/MANIFEST.MF index 7ed7bf32334..c2f4b0c2d8e 100644 --- a/rse/plugins/org.eclipse.rse.ui/META-INF/MANIFEST.MF +++ b/rse/plugins/org.eclipse.rse.ui/META-INF/MANIFEST.MF @@ -27,11 +27,7 @@ Export-Package: org.eclipse.rse.core, org.eclipse.rse.filters, org.eclipse.rse.internal.filters, org.eclipse.rse.internal.model, - org.eclipse.rse.internal.persistence, - org.eclipse.rse.internal.persistence.dom, org.eclipse.rse.model, - org.eclipse.rse.persistence, - org.eclipse.rse.persistence.dom, org.eclipse.rse.ui, org.eclipse.rse.ui.actions, org.eclipse.rse.ui.dialogs, diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRemoteSelectionAddListener.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRemoteSelectionAddListener.java index 79ab84e9674..c608ca5167b 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRemoteSelectionAddListener.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRemoteSelectionAddListener.java @@ -15,7 +15,7 @@ ********************************************************************************/ package org.eclipse.rse.ui; -import org.eclipse.rse.model.IHost; +import org.eclipse.rse.core.model.IHost; /** *

diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java index 5aa77b1ab02..c9f3ffea056 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java @@ -30,6 +30,7 @@ import org.eclipse.core.runtime.Platform; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.rse.core.IRSESystemType; import org.eclipse.rse.core.ISystemViewSupplier; +import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.SystemPropertyPageExtension; import org.eclipse.rse.core.SystemResourceManager; @@ -38,15 +39,15 @@ import org.eclipse.rse.core.comm.SystemCommunicationsDaemon; import org.eclipse.rse.core.comm.SystemKeystoreProviderManager; import org.eclipse.rse.core.internal.subsystems.SubSystemConfigurationProxy; import org.eclipse.rse.core.internal.subsystems.SubSystemConfigurationProxyComparator; +import org.eclipse.rse.core.model.ISystemProfile; +import org.eclipse.rse.core.model.ISystemProfileManager; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy; import org.eclipse.rse.internal.model.SystemProfileManager; -import org.eclipse.rse.internal.model.SystemRegistry; import org.eclipse.rse.internal.persistence.RSEPersistenceManager; -import org.eclipse.rse.model.ISystemProfile; -import org.eclipse.rse.model.ISystemProfileManager; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemResourceChangeEvents; +import org.eclipse.rse.model.SystemRegistry; import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.model.SystemStartHere; import org.eclipse.rse.persistence.IRSEPersistenceManager; @@ -85,10 +86,9 @@ public class RSEUIPlugin extends SystemBasePlugin implements ISystemMessageProvi // private SystemType[] allSystemTypes = null; private String enabledSystemTypes; - private ISystemRegistry _systemRegistry = null; + private SystemRegistry _systemRegistry = null; - private IRSEPersistenceManager _persistenceManager = null; private ISubSystemConfigurationProxy[] subsystemConfigurations = null; @@ -477,6 +477,9 @@ public class RSEUIPlugin extends SystemBasePlugin implements ISystemMessageProvi messageFile = getMessageFile("systemmessages.xml"); //$NON-NLS-1$ defaultMessageFile = getDefaultMessageFile("systemmessages.xml"); //$NON-NLS-1$ + ISystemRegistry registry = getSystemRegistry(); + + RSECorePlugin.getDefault().setSystemRegistry(registry); SystemResourceManager.getRemoteSystemsProject(); // create core folder tree try { @@ -511,7 +514,7 @@ public class RSEUIPlugin extends SystemBasePlugin implements ISystemMessageProvi // DKM - 49648 - need to make sure that this is first called on the main thread so // we don't hit an SWT invalid thread exception later when getting the shell - ISystemRegistry registry = getSystemRegistry(); + @@ -798,11 +801,7 @@ public class RSEUIPlugin extends SystemBasePlugin implements ISystemMessageProvi */ public IRSEPersistenceManager getPersistenceManager() { - if (_persistenceManager == null) - { - _persistenceManager = new RSEPersistenceManager(); - } - return _persistenceManager; + return RSECorePlugin.getThePersistenceManager(); } @@ -810,35 +809,36 @@ public class RSEUIPlugin extends SystemBasePlugin implements ISystemMessageProvi /** * Return the SystemRegistry singleton */ - public ISystemRegistry getSystemRegistry() + public SystemRegistry getSystemRegistry() { if (_systemRegistry == null) { String logfilePath = getStateLocation().toOSString(); - _systemRegistry = SystemRegistry.getSystemRegistry(logfilePath); + _systemRegistry = (SystemRegistry)SystemRegistry.getSystemRegistry(logfilePath); ISubSystemConfigurationProxy[] proxies = getSubSystemConfigurationProxies(); if (proxies != null) { _systemRegistry.setSubSystemConfigurationProxies(proxies); } + } - return _systemRegistry; + return (SystemRegistry)_systemRegistry; } /** * A static version for convenience * Returns the master registry singleton. */ - public static ISystemRegistry getTheSystemRegistry() + public static SystemRegistry getTheSystemRegistry() { return getDefault().getSystemRegistry(); } public static IRSEPersistenceManager getThePersistenceManager() { - return getDefault().getPersistenceManager(); + return RSECorePlugin.getThePersistenceManager(); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java index 780e7573cab..0b2fa8bd2ef 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java @@ -31,9 +31,9 @@ import org.eclipse.rse.core.ISystemUserIdConstants; import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.SystemPreferencesManager; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemProfile; -import org.eclipse.rse.model.ISystemRegistry; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemProfile; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.dialogs.SystemPromptDialog; import org.eclipse.rse.ui.messages.ISystemMessageLine; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemProfileForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemProfileForm.java index 53256bba8b8..5208f3dd560 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemProfileForm.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemProfileForm.java @@ -16,7 +16,8 @@ package org.eclipse.rse.ui; import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.rse.model.ISystemProfile; +import org.eclipse.rse.core.model.ISystemProfile; +import org.eclipse.rse.internal.model.SystemProfileManager; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.dialogs.SystemPromptDialog; import org.eclipse.rse.ui.messages.ISystemMessageLine; @@ -75,8 +76,11 @@ public class SystemProfileForm this.profile = profile; this.showVerbage = showVerbage; callerInstanceOfWizardPage = (caller instanceof WizardPage); - callerInstanceOfSystemPromptDialog = (caller instanceof SystemPromptDialog); - nameValidator = RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager().getProfileNameValidator(profile); + callerInstanceOfSystemPromptDialog = (caller instanceof SystemPromptDialog); + + // FIXME cast to SystemProfileManager is temporary to get at api - need to use an adapter for getting validators + SystemProfileManager mgr = (SystemProfileManager)RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager(); + nameValidator = mgr.getProfileNameValidator(profile); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemWidgetHelpers.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemWidgetHelpers.java index 8b84813e7a7..47282acfc8d 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemWidgetHelpers.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemWidgetHelpers.java @@ -21,8 +21,8 @@ import java.util.Locale; import org.eclipse.jface.action.IAction; import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.ui.widgets.InheritableEntryField; import org.eclipse.rse.ui.widgets.SystemHistoryCombo; import org.eclipse.rse.ui.widgets.SystemHostCombo; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemChangeFilterPane.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemChangeFilterPane.java index 8a2159f775c..b4c45df075e 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemChangeFilterPane.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemChangeFilterPane.java @@ -23,12 +23,12 @@ import org.eclipse.jface.action.Separator; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; -import org.eclipse.rse.filters.ISystemFilterReference; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterReference; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.ui.ISystemContextMenuConstants; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterDialogOutputs.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterDialogOutputs.java index df16f464a0a..4e92703cbf9 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterDialogOutputs.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterDialogOutputs.java @@ -16,7 +16,7 @@ package org.eclipse.rse.ui.filters; //import org.eclipse.rse.core.ui.actions.*; -import org.eclipse.rse.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilter; /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInputs.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInputs.java index 66a142bad9f..603587dec8a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInputs.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInputs.java @@ -16,9 +16,9 @@ package org.eclipse.rse.ui.filters; //import org.eclipse.rse.core.*; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager; import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogOutputs.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogOutputs.java index 94ad7a346c2..634dffda3da 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogOutputs.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogOutputs.java @@ -16,7 +16,7 @@ package org.eclipse.rse.ui.filters; //import org.eclipse.rse.core.*; -import org.eclipse.rse.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPool; import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolManagerUIProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolManagerUIProvider.java index 935c451cd11..c1d7f0a4d62 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolManagerUIProvider.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolManagerUIProvider.java @@ -15,7 +15,7 @@ ********************************************************************************/ package org.eclipse.rse.ui.filters; -import org.eclipse.rse.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement; public interface SystemFilterPoolManagerUIProvider diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterStringEditPane.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterStringEditPane.java index f3eccc8141d..f97f040c9ec 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterStringEditPane.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterStringEditPane.java @@ -17,8 +17,8 @@ package org.eclipse.rse.ui.filters; import java.util.Vector; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterUIHelpers.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterUIHelpers.java index e16c8cc9423..25a85dcb282 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterUIHelpers.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterUIHelpers.java @@ -18,11 +18,11 @@ package org.eclipse.rse.ui.filters; import java.util.Vector; import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider; import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterAction.java index 2bc2e07d346..851672fad76 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterAction.java @@ -18,12 +18,12 @@ package org.eclipse.rse.ui.filters.actions; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.filters.ISystemFilterPoolReference; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; -import org.eclipse.rse.filters.ISystemFilterReference; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPoolReference; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterReference; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterPoolAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterPoolAction.java index d1221f8f403..3c978d0cf2e 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterPoolAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterPoolAction.java @@ -18,16 +18,16 @@ package org.eclipse.rse.ui.filters.actions; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.ISelection; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.filters.ISystemFilterPoolReference; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; -import org.eclipse.rse.filters.ISystemFilterReference; -import org.eclipse.rse.filters.ISystemFilterString; -import org.eclipse.rse.filters.ISystemFilterStringReference; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPoolReference; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterReference; +import org.eclipse.rse.core.filters.ISystemFilterString; +import org.eclipse.rse.core.filters.ISystemFilterStringReference; import org.eclipse.rse.ui.actions.SystemBaseDialogAction; import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement; import org.eclipse.rse.ui.filters.SystemFilterPoolDialogInputs; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCascadingNewFilterPoolReferenceAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCascadingNewFilterPoolReferenceAction.java index f013adfd42f..8381d2f897a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCascadingNewFilterPoolReferenceAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCascadingNewFilterPoolReferenceAction.java @@ -17,8 +17,8 @@ package org.eclipse.rse.ui.filters.actions; import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.IMenuManager; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCascadingNewFilterPoolReferenceFPMgrAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCascadingNewFilterPoolReferenceFPMgrAction.java index b795d55ec4e..2b703527088 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCascadingNewFilterPoolReferenceFPMgrAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCascadingNewFilterPoolReferenceFPMgrAction.java @@ -17,9 +17,9 @@ package org.eclipse.rse.ui.filters.actions; import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.IMenuManager; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction; import org.eclipse.rse.ui.view.SystemViewMenuListener; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCopyFilterAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCopyFilterAction.java index 7ec6b2d421c..84fa65e5bae 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCopyFilterAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCopyFilterAction.java @@ -22,12 +22,12 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterReference; import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.filters.ISystemFilterReference; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCopyFilterPoolAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCopyFilterPoolAction.java index 1a0f408f214..14eafd89cb6 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCopyFilterPoolAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCopyFilterPoolAction.java @@ -22,11 +22,11 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPoolReference; import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.filters.ISystemFilterPoolReference; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCopyFilterStringAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCopyFilterStringAction.java index 3fca1cf18a2..2bafad4f8a1 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCopyFilterStringAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterCopyFilterStringAction.java @@ -22,13 +22,13 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterString; +import org.eclipse.rse.core.filters.ISystemFilterStringReference; import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.filters.ISystemFilterString; -import org.eclipse.rse.filters.ISystemFilterStringReference; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveDownFilterAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveDownFilterAction.java index eaa72dc6850..79d3560511d 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveDownFilterAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveDownFilterAction.java @@ -18,10 +18,10 @@ package org.eclipse.rse.ui.filters.actions; import java.util.Iterator; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterContainer; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterReference; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterContainer; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterReference; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveDownFilterPoolReferenceAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveDownFilterPoolReferenceAction.java index d1be898f1f8..ce5918e64c8 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveDownFilterPoolReferenceAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveDownFilterPoolReferenceAction.java @@ -18,8 +18,8 @@ package org.eclipse.rse.ui.filters.actions; import java.util.Iterator; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.filters.ISystemFilterPoolReference; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolReference; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveFilterAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveFilterAction.java index 33cd6e43dd4..6e895d91943 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveFilterAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveFilterAction.java @@ -22,12 +22,12 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterReference; import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.filters.ISystemFilterReference; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveFilterPoolAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveFilterPoolAction.java index 992854eb69e..9c153e26244 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveFilterPoolAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveFilterPoolAction.java @@ -22,11 +22,11 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPoolReference; import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.filters.ISystemFilterPoolReference; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveFilterStringAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveFilterStringAction.java index 903ee97c6c6..5ea2a41f889 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveFilterStringAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveFilterStringAction.java @@ -22,13 +22,13 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterString; +import org.eclipse.rse.core.filters.ISystemFilterStringReference; import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.filters.ISystemFilterString; -import org.eclipse.rse.filters.ISystemFilterStringReference; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveUpFilterAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveUpFilterAction.java index 62fd779511e..4bed51fea9a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveUpFilterAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveUpFilterAction.java @@ -18,10 +18,10 @@ package org.eclipse.rse.ui.filters.actions; import java.util.Iterator; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterContainer; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterReference; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterContainer; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterReference; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveUpFilterPoolReferenceAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveUpFilterPoolReferenceAction.java index db446291f78..530b4a8b3f9 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveUpFilterPoolReferenceAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterMoveUpFilterPoolReferenceAction.java @@ -18,8 +18,8 @@ package org.eclipse.rse.ui.filters.actions; import java.util.Iterator; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.filters.ISystemFilterPoolReference; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolReference; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterNewFilterPoolAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterNewFilterPoolAction.java index dd8bd766b6b..0f62994ba08 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterNewFilterPoolAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterNewFilterPoolAction.java @@ -16,10 +16,10 @@ package org.eclipse.rse.ui.filters.actions; import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterPoolReferenceSelectAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterPoolReferenceSelectAction.java index aed24a03a6e..c8cbadcd92a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterPoolReferenceSelectAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterPoolReferenceSelectAction.java @@ -17,8 +17,8 @@ package org.eclipse.rse.ui.filters.actions; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.actions.SystemBaseAction; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterRemoveFilterPoolReferenceAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterRemoveFilterPoolReferenceAction.java index 0fa1ab9dfbf..3079dc50cfd 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterRemoveFilterPoolReferenceAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterRemoveFilterPoolReferenceAction.java @@ -18,8 +18,8 @@ package org.eclipse.rse.ui.filters.actions; import java.util.Iterator; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.filters.ISystemFilterPoolReference; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolReference; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterSelectFilterPoolsAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterSelectFilterPoolsAction.java index fe2b0bb75da..7ad0a8ae85d 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterSelectFilterPoolsAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterSelectFilterPoolsAction.java @@ -18,10 +18,10 @@ package org.eclipse.rse.ui.filters.actions; import java.util.Vector; import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterWorkWithFilterPoolsAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterWorkWithFilterPoolsAction.java index 42df0780366..660065b18ad 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterWorkWithFilterPoolsAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterWorkWithFilterPoolsAction.java @@ -16,8 +16,8 @@ package org.eclipse.rse.ui.filters.actions; import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemNewFilterAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemNewFilterAction.java index 2583349fb25..c6ad81c1b4e 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemNewFilterAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemNewFilterAction.java @@ -19,16 +19,16 @@ import java.util.Vector; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.wizard.IWizard; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterContainer; +import org.eclipse.rse.core.filters.ISystemFilterContainerReference; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolReference; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPoolSelectionValidator; +import org.eclipse.rse.core.filters.ISystemFilterPoolWrapperInformation; +import org.eclipse.rse.core.filters.ISystemFilterReference; import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterContainer; -import org.eclipse.rse.filters.ISystemFilterContainerReference; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolReference; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; -import org.eclipse.rse.filters.ISystemFilterPoolSelectionValidator; -import org.eclipse.rse.filters.ISystemFilterPoolWrapperInformation; -import org.eclipse.rse.filters.ISystemFilterReference; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemChangeFilterDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemChangeFilterDialog.java index 9a9e8990f96..cf270f4b8ef 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemChangeFilterDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemChangeFilterDialog.java @@ -16,8 +16,8 @@ package org.eclipse.rse.ui.filters.dialogs; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemPageCompleteListener; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizard.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizard.java index 95d0289049e..a50ae444535 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizard.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizard.java @@ -17,8 +17,8 @@ package org.eclipse.rse.ui.filters.dialogs; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizardDefaultMainPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizardDefaultMainPage.java index 62816b28271..b215c5a2152 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizardDefaultMainPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizardDefaultMainPage.java @@ -16,7 +16,7 @@ package org.eclipse.rse.ui.filters.dialogs; import org.eclipse.jface.wizard.Wizard; -import org.eclipse.rse.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizardMainPageInterface.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizardMainPageInterface.java index e7e3f092414..bee623fce62 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizardMainPageInterface.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterNewFilterPoolWizardMainPageInterface.java @@ -16,7 +16,7 @@ package org.eclipse.rse.ui.filters.dialogs; -import org.eclipse.rse.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; import org.eclipse.rse.ui.filters.SystemFilterPoolDialogOutputs; import org.eclipse.rse.ui.validators.ISystemValidator; import org.eclipse.rse.ui.wizards.ISystemWizardPage; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterWorkWithFilterPoolsDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterWorkWithFilterPoolsDialog.java index 310d3cb4a2a..791bef487bf 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterWorkWithFilterPoolsDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterWorkWithFilterPoolsDialog.java @@ -27,10 +27,10 @@ import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager; import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.ui.ISystemDeleteTarget; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizard.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizard.java index 797e51b23c9..193c32b8781 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizard.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizard.java @@ -20,18 +20,18 @@ import java.util.Vector; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterContainer; -import org.eclipse.rse.filters.ISystemFilterContainerReference; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolReference; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; -import org.eclipse.rse.filters.ISystemFilterPoolSelectionValidator; -import org.eclipse.rse.filters.ISystemFilterPoolWrapper; -import org.eclipse.rse.filters.ISystemFilterPoolWrapperInformation; -import org.eclipse.rse.filters.ISystemFilterReference; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterContainer; +import org.eclipse.rse.core.filters.ISystemFilterContainerReference; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolReference; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPoolSelectionValidator; +import org.eclipse.rse.core.filters.ISystemFilterPoolWrapper; +import org.eclipse.rse.core.filters.ISystemFilterPoolWrapperInformation; +import org.eclipse.rse.core.filters.ISystemFilterReference; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardMainPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardMainPage.java index c11592d37a0..6dad5f22ff8 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardMainPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardMainPage.java @@ -18,7 +18,7 @@ package org.eclipse.rse.ui.filters.dialogs; import java.util.Vector; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.filters.ISystemFilterStringEditPaneListener; import org.eclipse.rse.ui.filters.SystemFilterStringEditPane; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java index 0e554f0cf5f..86ce30fe402 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java @@ -15,10 +15,10 @@ ********************************************************************************/ package org.eclipse.rse.ui.filters.dialogs; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolSelectionValidator; -import org.eclipse.rse.filters.ISystemFilterPoolWrapper; -import org.eclipse.rse.filters.ISystemFilterPoolWrapperInformation; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolSelectionValidator; +import org.eclipse.rse.core.filters.ISystemFilterPoolWrapper; +import org.eclipse.rse.core.filters.ISystemFilterPoolWrapperInformation; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.validators.ISystemValidator; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemUnNamedFilterDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemUnNamedFilterDialog.java index 1f3ffa55b19..05e7ff18720 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemUnNamedFilterDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemUnNamedFilterDialog.java @@ -16,7 +16,7 @@ package org.eclipse.rse.ui.filters.dialogs; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.dialogs.SystemPromptDialog; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemFetchOperation.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemFetchOperation.java index c67558ed567..4378cbb41f5 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemFetchOperation.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemFetchOperation.java @@ -27,9 +27,9 @@ import org.eclipse.jface.action.IAction; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.subsystems.SubSystem; import org.eclipse.rse.core.subsystems.SubSystem.DisplayErrorMessageJob; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.ui.GenericMessages; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java index 90f4e4f8152..5674bf1a57a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java @@ -16,9 +16,9 @@ package org.eclipse.rse.ui.propertypages; -import org.eclipse.rse.core.servicesubsystem.IServiceSubSystem; -import org.eclipse.rse.core.servicesubsystem.IServiceSubSystemConfiguration; import org.eclipse.rse.core.subsystems.IConnectorService; +import org.eclipse.rse.core.subsystems.IServiceSubSystem; +import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration; import org.eclipse.rse.ui.widgets.services.FactoryServiceElement; import org.eclipse.rse.ui.widgets.services.RootServiceElement; import org.eclipse.rse.ui.widgets.services.ServiceElement; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SignonPreferencePage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SignonPreferencePage.java index c158a59c905..f5553bdc91d 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SignonPreferencePage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SignonPreferencePage.java @@ -29,10 +29,10 @@ import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.window.Window; import org.eclipse.rse.core.PasswordPersistenceManager; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.SystemSignonInformation; import org.eclipse.rse.core.subsystems.IConnectorService; import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.SystemSignonInformation; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemAbstractPropertyPageExtensionAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemAbstractPropertyPageExtensionAction.java index 8cccc141fbf..5e2b3571e74 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemAbstractPropertyPageExtensionAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemAbstractPropertyPageExtensionAction.java @@ -17,9 +17,9 @@ package org.eclipse.rse.ui.propertypages; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.Platform; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; import org.eclipse.swt.widgets.Composite; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemChangeFilterPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemChangeFilterPropertyPage.java index 98a99b93877..a6a414c1c15 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemChangeFilterPropertyPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemChangeFilterPropertyPage.java @@ -15,13 +15,13 @@ ********************************************************************************/ package org.eclipse.rse.ui.propertypages; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterReference; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.core.subsystems.SubSystemHelpers; import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; -import org.eclipse.rse.filters.ISystemFilterReference; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemPageCompleteListener; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectionPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectionPropertyPage.java index 1c69f19402e..9515a902aec 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectionPropertyPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectionPropertyPage.java @@ -17,9 +17,9 @@ package org.eclipse.rse.ui.propertypages; import org.eclipse.rse.core.IRSESystemType; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.ui.ISystemConnectionFormCaller; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemConnectionForm; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectionSubSystemsPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectionSubSystemsPropertyPage.java index f399ce0b5df..e89fd98f765 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectionSubSystemsPropertyPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectionSubSystemsPropertyPage.java @@ -20,8 +20,9 @@ import java.util.Vector; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.rse.core.SystemAdapterHelpers; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.model.IHost; +import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter; import org.eclipse.rse.ui.ISystemConnectionFormCaller; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemPropertyResources; @@ -143,7 +144,9 @@ public class SystemConnectionSubSystemsPropertyPage extends SystemBasePropertyPa for (int idx = 0; idx < subsystems.length; idx++) { ISubSystem ss = subsystems[idx]; - PropertyPage page = ss.getPropertyPage(tabFolder); + + ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ss.getSubSystemConfiguration().getAdapter(ISubSystemConfigurationAdapter.class); + PropertyPage page = adapter.getPropertyPage(ss, tabFolder); if (page != null) { @@ -189,7 +192,9 @@ public class SystemConnectionSubSystemsPropertyPage extends SystemBasePropertyPa ISubSystem ss = (ISubSystem)((IWorkbenchPropertyPage)page).getElement(); CTabItem tabItem = new CTabItem(tabFolder, SWT.NONE); tabItem.setText(ss.getName()); - Image image = ss.getSubSystemConfiguration().getGraphicsImage(); + + ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ss.getSubSystemConfiguration().getAdapter(ISubSystemConfigurationAdapter.class); + Image image = adapter.getGraphicsImage(ss.getSubSystemConfiguration()); if (image != null) { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectorServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectorServicesPropertyPage.java index 0f7cefc4304..8db94f0cbd0 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectorServicesPropertyPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectorServicesPropertyPage.java @@ -16,8 +16,8 @@ package org.eclipse.rse.ui.propertypages; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.subsystems.IConnectorService; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.ui.widgets.services.ConnectorServiceElement; import org.eclipse.rse.ui.widgets.services.ConnectorServicesForm; import org.eclipse.rse.ui.widgets.services.RootServiceElement; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterPoolPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterPoolPropertyPage.java index 1819a30e6be..a7d5fda7188 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterPoolPropertyPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterPoolPropertyPage.java @@ -15,9 +15,9 @@ ********************************************************************************/ package org.eclipse.rse.ui.propertypages; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolReference; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolReference; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemPropertyResources; import org.eclipse.rse.ui.SystemResources; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterPoolReferencePropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterPoolReferencePropertyPage.java index 3b119c0d83a..6254991dcad 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterPoolReferencePropertyPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterPoolReferencePropertyPage.java @@ -15,10 +15,10 @@ ********************************************************************************/ package org.eclipse.rse.ui.propertypages; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolReference; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolReference; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterPropertyPage.java index 167139c89bc..35f0d8511f3 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterPropertyPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterPropertyPage.java @@ -15,10 +15,10 @@ ********************************************************************************/ package org.eclipse.rse.ui.propertypages; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterReference; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterReference; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterStringPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterStringPropertyPage.java index 8935eb050c5..2586bad1f20 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterStringPropertyPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterStringPropertyPage.java @@ -19,14 +19,14 @@ import java.util.ResourceBundle; import java.util.Vector; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterString; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; -import org.eclipse.rse.filters.ISystemFilterString; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemSubSystemPropertyPageCoreForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemSubSystemPropertyPageCoreForm.java index 9bb1b6adbcc..755b5df0df5 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemSubSystemPropertyPageCoreForm.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemSubSystemPropertyPageCoreForm.java @@ -18,6 +18,7 @@ package org.eclipse.rse.ui.propertypages; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; +import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.RSEUIPlugin; @@ -134,7 +135,9 @@ public class SystemSubSystemPropertyPageCoreForm extends AbstractSystemSubSystem { if (portValidator == null) { - portValidator = getSubSystem().getSubSystemConfiguration().getPortValidator(); + ISubSystemConfiguration ssFactory = getSubSystem().getSubSystemConfiguration(); + ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssFactory.getAdapter(ISubSystemConfigurationAdapter.class); + portValidator = adapter.getPortValidator(ssFactory); } return portValidator; } @@ -146,7 +149,9 @@ public class SystemSubSystemPropertyPageCoreForm extends AbstractSystemSubSystem initDone = true; ISubSystem ss = getSubSystem(); ISubSystemConfiguration ssFactory = ss.getSubSystemConfiguration(); - userIdValidator = ssFactory.getUserIdValidator(); + ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssFactory.getAdapter(ISubSystemConfigurationAdapter.class); + + userIdValidator = adapter.getUserIdValidator(ssFactory); //getPortValidator(); // vendor labelVendor.setText(ssFactory.getVendor()); @@ -193,7 +198,9 @@ public class SystemSubSystemPropertyPageCoreForm extends AbstractSystemSubSystem initDone = true; ISubSystem ss = getSubSystem(); ISubSystemConfiguration ssFactory = ss.getSubSystemConfiguration(); - userIdValidator = ssFactory.getUserIdValidator(); + ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssFactory.getAdapter(ISubSystemConfigurationAdapter.class); + + userIdValidator = adapter.getUserIdValidator(ssFactory); // userId if (userIdApplicable) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTeamViewProfilePropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTeamViewProfilePropertyPage.java index 708f1b20c1a..48f0ca8fd3b 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTeamViewProfilePropertyPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTeamViewProfilePropertyPage.java @@ -15,7 +15,7 @@ ********************************************************************************/ package org.eclipse.rse.ui.propertypages; -import org.eclipse.rse.model.ISystemProfile; +import org.eclipse.rse.core.model.ISystemProfile; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemPropertyResources; import org.eclipse.rse.ui.SystemWidgetHelpers; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/IValidatorRemoteSelection.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/IValidatorRemoteSelection.java index 6794660be4f..a0bd91b4768 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/IValidatorRemoteSelection.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/IValidatorRemoteSelection.java @@ -15,7 +15,7 @@ ********************************************************************************/ package org.eclipse.rse.ui.validators; -import org.eclipse.rse.model.IHost; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorConnectionName.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorConnectionName.java index 20a2c7d2f8d..fc916cdb4ba 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorConnectionName.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorConnectionName.java @@ -17,7 +17,7 @@ package org.eclipse.rse.ui.validators; import java.util.Vector; -import org.eclipse.rse.model.IHost; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterString.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterString.java index ce2828d466d..2aa4070cbec 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterString.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterString.java @@ -17,7 +17,7 @@ package org.eclipse.rse.ui.validators; import java.util.Vector; -import org.eclipse.rse.filters.ISystemFilterString; +import org.eclipse.rse.core.filters.ISystemFilterString; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorRemoteSelection.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorRemoteSelection.java index e73a5c71cc8..322aa73994d 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorRemoteSelection.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorRemoteSelection.java @@ -15,7 +15,7 @@ ********************************************************************************/ package org.eclipse.rse.ui.validators; -import org.eclipse.rse.model.IHost; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapter.java index d70ebb52c6b..6f10a3df8e5 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapter.java @@ -42,6 +42,7 @@ import org.eclipse.rse.core.model.ISystemProfile; import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; +import org.eclipse.rse.core.subsystems.SubSystem; import org.eclipse.rse.core.subsystems.SubSystemConfiguration; import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter; import org.eclipse.rse.filters.SystemFilterPoolWrapperInformation; @@ -1463,8 +1464,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda public PropertyPage getPropertyPage(ISubSystem subsystem, Composite parent) { - // TODO Auto-generated method stub - return null; + return ((SubSystem)subsystem).getPropertyPage(parent); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemAbstractAPIProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemAbstractAPIProvider.java index 2dcd29e64b7..11df1ea555f 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemAbstractAPIProvider.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemAbstractAPIProvider.java @@ -19,8 +19,8 @@ import org.eclipse.core.runtime.Platform; import org.eclipse.jface.viewers.Viewer; import org.eclipse.rse.core.SystemAdapterHelpers; import org.eclipse.rse.core.model.ISystemMessageObject; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.model.SystemMessageObject; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.widgets.Shell; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemDNDTransferRunnable.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemDNDTransferRunnable.java index b35445a0cef..bc0d9b15da2 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemDNDTransferRunnable.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemDNDTransferRunnable.java @@ -28,15 +28,15 @@ import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.filters.ISystemFilterReference; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.model.ISystemContainer; import org.eclipse.rse.core.model.ISystemResourceSet; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; -import org.eclipse.rse.filters.ISystemFilterReference; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemRemoteChangeEvents; import org.eclipse.rse.model.ISystemResourceChangeEvents; +import org.eclipse.rse.model.SystemRegistry; import org.eclipse.rse.model.SystemRemoteResourceSet; import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.services.clientserver.messages.SystemMessage; @@ -149,7 +149,7 @@ public class SystemDNDTransferRunnable extends Job String targetPath = targetAdapter.getAbsoluteName(target); boolean sameSubSystemType = true; - String targetType = ""; //$NON-NLS-1$ + String targetType = ""; if (targetSubSystem != null) { targetType = targetSubSystem.getName(); @@ -567,7 +567,7 @@ public class SystemDNDTransferRunnable extends Job public IStatus runInUIThread(IProgressMonitor monitor) { - ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); + SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); if (_resultTgtObjects.size() > 0) { boolean doRefresh = _ok; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemEmptyListAPIProviderImpl.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemEmptyListAPIProviderImpl.java index c1c0d371c4b..5141a872d01 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemEmptyListAPIProviderImpl.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemEmptyListAPIProviderImpl.java @@ -15,7 +15,7 @@ ********************************************************************************/ package org.eclipse.rse.ui.view; -import org.eclipse.rse.model.IHost; +import org.eclipse.rse.core.model.IHost; /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemResourceSelectionForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemResourceSelectionForm.java index 14b1752d517..065715bf887 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemResourceSelectionForm.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemResourceSelectionForm.java @@ -27,10 +27,10 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.rse.core.SystemAdapterHelpers; +import org.eclipse.rse.core.filters.ISystemFilterReference; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.filters.ISystemFilterReference; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemWidgetHelpers; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemResourceSelectionInputProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemResourceSelectionInputProvider.java index a5c91aa5a99..c0181d93538 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemResourceSelectionInputProvider.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemResourceSelectionInputProvider.java @@ -15,9 +15,9 @@ ********************************************************************************/ package org.eclipse.rse.ui.view; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java index c57637e2e9f..54ccbbe0815 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java @@ -17,14 +17,14 @@ package org.eclipse.rse.ui.view; import org.eclipse.rse.core.SystemAdapterHelpers; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterReference; +import org.eclipse.rse.core.filters.ISystemFilterStringReference; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterReference; -import org.eclipse.rse.filters.ISystemFilterStringReference; import org.eclipse.rse.filters.SystemFilterSimple; import org.eclipse.rse.internal.model.SystemNewConnectionPromptObject; -import org.eclipse.rse.model.IHost; import org.eclipse.swt.widgets.Shell; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableTreeView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableTreeView.java index aeaa1bda619..eebcdbee356 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableTreeView.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableTreeView.java @@ -46,15 +46,16 @@ import org.eclipse.jface.window.SameShellProvider; import org.eclipse.rse.core.SystemAdapterHelpers; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.SystemPopupMenuActionContributorManager; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemRemoteChangeEvent; import org.eclipse.rse.model.ISystemRemoteChangeEvents; import org.eclipse.rse.model.ISystemRemoteChangeListener; import org.eclipse.rse.model.ISystemResourceChangeEvent; import org.eclipse.rse.model.ISystemResourceChangeEvents; import org.eclipse.rse.model.ISystemResourceChangeListener; +import org.eclipse.rse.model.SystemRegistry; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemDeleteTarget; @@ -1256,7 +1257,7 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec */ public boolean doDelete(IProgressMonitor monitor) { - ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); + SystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); IStructuredSelection selection = (IStructuredSelection) getSelection(); Iterator elements = selection.iterator(); //int selectedCount = selection.size(); @@ -1348,7 +1349,7 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec */ public boolean doRename(String[] newNames) { - ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); + SystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); IStructuredSelection selection = (IStructuredSelection) getSelection(); Iterator elements = selection.iterator(); //int selectedCount = selection.size(); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java index 1d7f4006e97..606aa79ea13 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java @@ -46,17 +46,18 @@ import org.eclipse.jface.window.SameShellProvider; import org.eclipse.rse.core.SystemAdapterHelpers; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.SystemPopupMenuActionContributorManager; +import org.eclipse.rse.core.filters.ISystemFilterReference; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.model.ISystemContainer; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.filters.ISystemFilterReference; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemRemoteChangeEvent; import org.eclipse.rse.model.ISystemRemoteChangeEvents; import org.eclipse.rse.model.ISystemRemoteChangeListener; import org.eclipse.rse.model.ISystemResourceChangeEvent; import org.eclipse.rse.model.ISystemResourceChangeEvents; import org.eclipse.rse.model.ISystemResourceChangeListener; +import org.eclipse.rse.model.SystemRegistry; import org.eclipse.rse.services.clientserver.StringCompare; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.ui.ISystemContextMenuConstants; @@ -129,7 +130,7 @@ public class SystemTableView Object value = adapter.getPropertyValue(property); if (value == null) { - value = ""; //$NON-NLS-1$ + value = ""; } return value; } @@ -299,7 +300,7 @@ public class SystemTableView _charWidth = table.getFont().getFontData()[0].getHeight() / 2; computeLayout(); - _menuManager = new MenuManager("#PopupMenu"); //$NON-NLS-1$ + _menuManager = new MenuManager("#PopupMenu"); _menuManager.setRemoveAllWhenShown(true); _menuManager.addMenuListener(this); Menu menu = _menuManager.createContextMenu(table); @@ -1406,7 +1407,7 @@ public class SystemTableView */ public boolean doDelete(IProgressMonitor monitor) { - ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); + SystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); IStructuredSelection selection = (IStructuredSelection) getSelection(); Iterator elements = selection.iterator(); //int selectedCount = selection.size(); @@ -1498,7 +1499,7 @@ public class SystemTableView */ public boolean doRename(String[] newNames) { - ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); + SystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); IStructuredSelection selection = (IStructuredSelection) getSelection(); Iterator elements = selection.iterator(); int selectedCount = selection.size(); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewPart.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewPart.java index 3cf605e2488..75a1ee37194 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewPart.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewPart.java @@ -43,18 +43,19 @@ import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.window.Window; import org.eclipse.rse.core.SystemPreferencesManager; +import org.eclipse.rse.core.filters.ISystemFilterReference; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.model.ISystemContainer; +import org.eclipse.rse.core.model.ISystemProfile; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.filters.ISystemFilterReference; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemProfile; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemRemoteChangeEvent; import org.eclipse.rse.model.ISystemRemoteChangeEvents; import org.eclipse.rse.model.ISystemRemoteChangeListener; import org.eclipse.rse.model.ISystemResourceChangeEvent; import org.eclipse.rse.model.ISystemResourceChangeEvents; import org.eclipse.rse.model.ISystemResourceChangeListener; +import org.eclipse.rse.model.SystemRegistry; import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemIconConstants; @@ -145,10 +146,10 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, { public ForwardAction() { - super(SystemResources.ACTION_HISTORY_MOVEFORWARD_LABEL, getEclipseImageDescriptor("elcl16/forward_nav.gif")); //$NON-NLS-1$ + super(SystemResources.ACTION_HISTORY_MOVEFORWARD_LABEL, getEclipseImageDescriptor("elcl16/forward_nav.gif")); setTitleToolTip(SystemResources.ACTION_HISTORY_MOVEFORWARD_TOOLTIP); - setDisabledImageDescriptor(getEclipseImageDescriptor("dlcl16/forward_nav.gif")); //$NON-NLS-1$ + setDisabledImageDescriptor(getEclipseImageDescriptor("dlcl16/forward_nav.gif")); } public void checkEnabledState() @@ -178,9 +179,9 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, { public BackwardAction() { - super(SystemResources.ACTION_HISTORY_MOVEBACKWARD_LABEL, getEclipseImageDescriptor("elcl16/backward_nav.gif")); //$NON-NLS-1$ + super(SystemResources.ACTION_HISTORY_MOVEBACKWARD_LABEL, getEclipseImageDescriptor("elcl16/backward_nav.gif")); setTitleToolTip(SystemResources.ACTION_HISTORY_MOVEBACKWARD_TOOLTIP); - setDisabledImageDescriptor(getEclipseImageDescriptor("dlcl16/backward_nav.gif")); //$NON-NLS-1$ + setDisabledImageDescriptor(getEclipseImageDescriptor("dlcl16/backward_nav.gif")); } public void checkEnabledState() @@ -211,9 +212,9 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, private IAdaptable _parent; public UpAction() { - super(SystemResources.ACTION_MOVEUP_LABEL, getEclipseImageDescriptor("elcl16/up_nav.gif")); //$NON-NLS-1$ + super(SystemResources.ACTION_MOVEUP_LABEL, getEclipseImageDescriptor("elcl16/up_nav.gif")); - setDisabledImageDescriptor(getEclipseImageDescriptor("dlcl16/up_nav.gif")); //$NON-NLS-1$ + setDisabledImageDescriptor(getEclipseImageDescriptor("dlcl16/up_nav.gif")); } public void checkEnabledState() @@ -329,7 +330,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, ((ISystemContainer)inputObject).markStale(true); } ((SystemTableViewProvider) _viewer.getContentProvider()).flushCache(); - ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); + SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); registry.fireEvent(new SystemResourceChangeEvent(inputObject, ISystemResourceChangeEvents.EVENT_REFRESH, inputObject)); //_viewer.refresh(); @@ -441,7 +442,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, _cbName = SystemWidgetHelpers.createCombo(c, null); GridData textData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL); _cbName.setLayoutData(textData); - _cbName.setText("*"); //$NON-NLS-1$ + _cbName.setText("*"); _cbName.setToolTipText(SystemResources.RESID_TABLE_POSITIONTO_ENTRY_TOOLTIP); this.getShell().setText(SystemResources.RESID_TABLE_POSITIONTO_LABEL); @@ -451,7 +452,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, private void setHelp() { - setHelp(RSEUIPlugin.HELPPREFIX + "gnpt0000"); //$NON-NLS-1$ + setHelp(RSEUIPlugin.HELPPREFIX + "gnpt0000"); } } @@ -532,7 +533,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, _controls[0] = SystemWidgetHelpers.createTextField(c, null); GridData textData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL); _controls[0].setLayoutData(textData); - _controls[0].setText("*"); //$NON-NLS-1$ + _controls[0].setText("*"); _controls[0].setToolTipText(SystemResources.RESID_TABLE_SUBSET_ENTRY_TOOLTIP); if (histFilters != null) @@ -550,7 +551,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, _controls[i + 1] = SystemWidgetHelpers.createTextField(c, null); GridData textData3 = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL); _controls[i + 1].setLayoutData(textData3); - _controls[i + 1].setText("*"); //$NON-NLS-1$ + _controls[i + 1].setText("*"); if (histFilters != null) { _controls[i + 1].setText(histFilters[i + 1]); @@ -564,7 +565,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, private void setHelp() { - setHelp(RSEUIPlugin.HELPPREFIX + "gnss0000"); //$NON-NLS-1$ + setHelp(RSEUIPlugin.HELPPREFIX + "gnss0000"); } } @@ -716,7 +717,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, String columnWidths = memento.getString(TAG_TABLE_VIEW_COLUMN_WIDTHS_ID); if (columnWidths != null) { - StringTokenizer tok = new StringTokenizer(columnWidths, ","); //$NON-NLS-1$ + StringTokenizer tok = new StringTokenizer(columnWidths, ","); int[] colWidths = new int[tok.countTokens()]; int t = 0; while (tok.hasMoreTokens()) @@ -1007,7 +1008,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, private void setHelp() { - setHelp(RSEUIPlugin.HELPPREFIX + "gntc0000"); //$NON-NLS-1$ + setHelp(RSEUIPlugin.HELPPREFIX + "gntc0000"); } } @@ -1081,20 +1082,20 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, private IStatusLineManager _statusLine = null; // constants - public static final String ID = "org.eclipse.rse.ui.view.systemTableView"; // matches id in plugin.xml, view tag //$NON-NLS-1$ + public static final String ID = "org.eclipse.rse.ui.view.systemTableView"; // matches id in plugin.xml, view tag // Restore memento tags - public static final String TAG_TABLE_VIEW_PROFILE_ID = "tableViewProfileID"; //$NON-NLS-1$ - public static final String TAG_TABLE_VIEW_CONNECTION_ID = "tableViewConnectionID"; //$NON-NLS-1$ - public static final String TAG_TABLE_VIEW_SUBSYSTEM_ID = "tableViewSubsystemID"; //$NON-NLS-1$ - public static final String TAG_TABLE_VIEW_OBJECT_ID = "tableViewObjectID"; //$NON-NLS-1$ - public static final String TAG_TABLE_VIEW_FILTER_ID = "tableViewFilterID"; //$NON-NLS-1$ + public static final String TAG_TABLE_VIEW_PROFILE_ID = "tableViewProfileID"; + public static final String TAG_TABLE_VIEW_CONNECTION_ID = "tableViewConnectionID"; + public static final String TAG_TABLE_VIEW_SUBSYSTEM_ID = "tableViewSubsystemID"; + public static final String TAG_TABLE_VIEW_OBJECT_ID = "tableViewObjectID"; + public static final String TAG_TABLE_VIEW_FILTER_ID = "tableViewFilterID"; // Subset memento tags - public static final String TAG_TABLE_VIEW_SUBSET = "subset"; //$NON-NLS-1$ + public static final String TAG_TABLE_VIEW_SUBSET = "subset"; // layout memento tags - public static final String TAG_TABLE_VIEW_COLUMN_WIDTHS_ID = "columnWidths"; //$NON-NLS-1$ + public static final String TAG_TABLE_VIEW_COLUMN_WIDTHS_ID = "columnWidths"; public void setFocus() { @@ -1151,7 +1152,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, _browsePosition = 0; // register global edit actions - ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); + SystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); Clipboard clipboard = registry.getSystemClipboard(); CellEditorActionHandler editorActionHandler = new CellEditorActionHandler(getViewSite().getActionBars()); @@ -1168,7 +1169,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, registry.addSystemResourceChangeListener(this); registry.addSystemRemoteChangeListener(this); - SystemWidgetHelpers.setHelp(_viewer.getControl(), RSEUIPlugin.HELPPREFIX + "sysd0000"); //$NON-NLS-1$ + SystemWidgetHelpers.setHelp(_viewer.getControl(), RSEUIPlugin.HELPPREFIX + "sysd0000"); getSite().registerContextMenu(_viewer.getContextMenuManager(), _viewer); } @@ -1270,7 +1271,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, try { Bundle bundle = Platform.getBundle(PlatformUI.PLUGIN_ID); - URL installURL = bundle.getEntry("/"); //$NON-NLS-1$ + URL installURL = bundle.getEntry("/"); URL url = new URL(installURL, iconPath + relativePath); return ImageDescriptor.createFromURL(url); } @@ -1327,9 +1328,9 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, { menuManager.removeAll(); menuManager.add(_selectColumnsAction); - menuManager.add(new Separator("View")); //$NON-NLS-1$ + menuManager.add(new Separator("View")); menuManager.add(_selectInputAction); - menuManager.add(new Separator("Filter")); //$NON-NLS-1$ + menuManager.add(new Separator("Filter")); menuManager.add(_positionToAction); menuManager.add(_subsetAction); @@ -1349,7 +1350,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, toolBarManager.add(_refreshAction); - toolBarManager.add(new Separator("Navigate")); //$NON-NLS-1$ + toolBarManager.add(new Separator("Navigate")); // only support history when we're locked if (_isLocked) { @@ -1359,7 +1360,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, toolBarManager.add(_upAction); - toolBarManager.add(new Separator("View")); //$NON-NLS-1$ + toolBarManager.add(new Separator("View")); toolBarManager.add(_selectColumnsAction); } @@ -1441,7 +1442,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, { if (object == null) { - setContentDescription(""); //$NON-NLS-1$ + setContentDescription(""); } else { @@ -1452,7 +1453,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, String name = va.getName(object); //setPartName(type + " " + name); - setContentDescription(type + " "+ name); //$NON-NLS-1$ + setContentDescription(type + " "+ name); //SystemTableViewProvider provider = (SystemTableViewProvider) _viewer.getContentProvider(); //setTitleImage(provider.getImage(object)); @@ -1729,7 +1730,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, } else { - columnWidths += width + ","; //$NON-NLS-1$ + columnWidths += width + ","; } } memento.putString(TAG_TABLE_VIEW_COLUMN_WIDTHS_ID, columnWidths); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTestFilterStringAPIProviderImpl.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTestFilterStringAPIProviderImpl.java index c1769de981c..9a0a1bca76a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTestFilterStringAPIProviderImpl.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTestFilterStringAPIProviderImpl.java @@ -16,10 +16,10 @@ package org.eclipse.rse.ui.view; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.model.ISystemMessageObject; import org.eclipse.rse.core.model.SystemMessageObject; import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemView.java index 4c22e52adfa..4f3ec54c48c 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemView.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemView.java @@ -56,29 +56,30 @@ import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.SystemElapsedTimer; import org.eclipse.rse.core.SystemPopupMenuActionContributorManager; import org.eclipse.rse.core.SystemPreferencesManager; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterContainer; +import org.eclipse.rse.core.filters.ISystemFilterContainerReference; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolReference; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterReference; +import org.eclipse.rse.core.filters.ISystemFilterString; +import org.eclipse.rse.core.filters.ISystemFilterStringReference; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.model.ISystemContainer; import org.eclipse.rse.core.model.ISystemMessageObject; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.references.IRSEBaseReferencingObject; import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterContainer; -import org.eclipse.rse.filters.ISystemFilterContainerReference; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolReference; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; -import org.eclipse.rse.filters.ISystemFilterReference; -import org.eclipse.rse.filters.ISystemFilterString; -import org.eclipse.rse.filters.ISystemFilterStringReference; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.model.ISystemPromptableObject; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemRemoteChangeEvent; import org.eclipse.rse.model.ISystemRemoteChangeEvents; import org.eclipse.rse.model.ISystemRemoteChangeListener; import org.eclipse.rse.model.ISystemResourceChangeEvent; import org.eclipse.rse.model.ISystemResourceChangeEvents; import org.eclipse.rse.model.ISystemResourceChangeListener; +import org.eclipse.rse.model.SystemRegistry; import org.eclipse.rse.model.SystemRemoteElementResourceSet; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.ui.ISystemContextMenuConstants; @@ -415,7 +416,7 @@ public class SystemView extends TreeViewer implements ISystemTree, // ----------------------------- // Enable right-click popup menu // ----------------------------- - menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$ + menuMgr = new MenuManager("#PopupMenu"); menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(this); Menu menu = menuMgr.createContextMenu(getTree()); @@ -519,7 +520,7 @@ public class SystemView extends TreeViewer implements ISystemTree, { if ((event.character == SWT.DEL) && (event.stateMask == 0) && (((IStructuredSelection)getSelection()).size()>0) ) { - scanSelections("handleKeyPressed"); //$NON-NLS-1$ + scanSelections("handleKeyPressed"); /* DKM - 53694 if (showDelete() && canDelete()) { @@ -859,7 +860,7 @@ public class SystemView extends TreeViewer implements ISystemTree, // WHEN THAT CHANGES, WILL CALL CANDELETE() HERE. THAT IN TURN WILL CALL SCANSELECTIONS. // THIS MEANS SCAN SELECTIONS GETS CALL TWICE ON MOST RIGHT CLICK ACTIONS. if (!selectionFlagsUpdated) // might already be called by the global delete action wh - scanSelections("fillContextMenu"); //$NON-NLS-1$ + scanSelections("fillContextMenu"); // ADD COMMON ACTIONS... @@ -1189,13 +1190,13 @@ public class SystemView extends TreeViewer implements ISystemTree, return; else { - logMyDebugMessage(this.getClass().getName(),": -----------------------------------------------------------"); //$NON-NLS-1$ - logMyDebugMessage(this.getClass().getName(),": REMOTE SSFID.......: " + element.getSubSystemConfigurationId(firstSelection)); //$NON-NLS-1$ - logMyDebugMessage(this.getClass().getName(),": REMOTE NAME........: " + element.getName(firstSelection)); //$NON-NLS-1$ - logMyDebugMessage(this.getClass().getName(),": REMOTE TYPECATEGORY: " + element.getRemoteTypeCategory(firstSelection)); //$NON-NLS-1$ - logMyDebugMessage(this.getClass().getName(),": REMOTE TYPE........: " + element.getRemoteType(firstSelection)); //$NON-NLS-1$ - logMyDebugMessage(this.getClass().getName(),": REMOTE SUBTYPE.....: " + element.getRemoteSubType(firstSelection)); //$NON-NLS-1$ - logMyDebugMessage(this.getClass().getName(),": REMOTE SUBSUBTYPE..: " + element.getRemoteSubSubType(firstSelection)); //$NON-NLS-1$ + logMyDebugMessage(this.getClass().getName(),": -----------------------------------------------------------"); + logMyDebugMessage(this.getClass().getName(),": REMOTE SSFID.......: " + element.getSubSystemConfigurationId(firstSelection)); + logMyDebugMessage(this.getClass().getName(),": REMOTE NAME........: " + element.getName(firstSelection)); + logMyDebugMessage(this.getClass().getName(),": REMOTE TYPECATEGORY: " + element.getRemoteTypeCategory(firstSelection)); + logMyDebugMessage(this.getClass().getName(),": REMOTE TYPE........: " + element.getRemoteType(firstSelection)); + logMyDebugMessage(this.getClass().getName(),": REMOTE SUBTYPE.....: " + element.getRemoteSubType(firstSelection)); + logMyDebugMessage(this.getClass().getName(),": REMOTE SUBSUBTYPE..: " + element.getRemoteSubSubType(firstSelection)); } } } @@ -1204,7 +1205,7 @@ public class SystemView extends TreeViewer implements ISystemTree, if (!debugProperties) return; //RSEUIPlugin.logDebugMessage(prefix, msg); - System.out.println(prefix+" "+msg); //$NON-NLS-1$ + System.out.println(prefix+" "+msg); } /** @@ -1421,7 +1422,7 @@ public class SystemView extends TreeViewer implements ISystemTree, if (doTimings && (item instanceof TreeItem) && (((TreeItem)item).getData() != null)) { elapsedTime.setEndTime(); - System.out.println("Time to expand for " + ((TreeItem)item).getItemCount() + " items: " + elapsedTime); //$NON-NLS-1$ //$NON-NLS-2$ + System.out.println("Time to expand for " + ((TreeItem)item).getItemCount() + " items: " + elapsedTime); } } @@ -1809,7 +1810,7 @@ public class SystemView extends TreeViewer implements ISystemTree, case EVENT_ADD_RELATIVE: if (debug) { - logDebugMsg("SV event: EVENT_ADD "); //$NON-NLS-1$ + logDebugMsg("SV event: EVENT_ADD "); } clearSelection(); //refresh(parent); @@ -1850,7 +1851,7 @@ public class SystemView extends TreeViewer implements ISystemTree, case EVENT_ADD_MANY: if (debug) { - logDebugMsg("SV event: EVENT_ADD_MANY"); //$NON-NLS-1$ + logDebugMsg("SV event: EVENT_ADD_MANY"); } multiSource = _event.getMultiSource(); clearSelection(); @@ -1892,7 +1893,7 @@ public class SystemView extends TreeViewer implements ISystemTree, for (int idx=0; idx 0) { @@ -2099,7 +2100,7 @@ public class SystemView extends TreeViewer implements ISystemTree, //break; case EVENT_REFRESH: if (debug) - logDebugMsg("SV event: EVENT_REFRESH "); //$NON-NLS-1$ + logDebugMsg("SV event: EVENT_REFRESH "); //if (src != null) // refresh(src); // ONLY VALID WHEN USER TRULY WANTS TO REQUERY CHILDREN FROM HOST //else @@ -2117,7 +2118,7 @@ public class SystemView extends TreeViewer implements ISystemTree, // todo: intelligently re-select previous selections case EVENT_REFRESH_SELECTED_PARENT: if (debug) - logDebugMsg("SV event: EVENT_REFRESH_SELECTED_PARENT "); //$NON-NLS-1$ + logDebugMsg("SV event: EVENT_REFRESH_SELECTED_PARENT "); TreeItem[] items = getTree().getSelection(); if ((items != null) && (items.length > 0) && (items[0] != null)) { @@ -2136,7 +2137,7 @@ public class SystemView extends TreeViewer implements ISystemTree, break; case EVENT_REFRESH_SELECTED: if (debug) - logDebugMsg("SV event: EVENT_REFRESH_SELECTED "); //$NON-NLS-1$ + logDebugMsg("SV event: EVENT_REFRESH_SELECTED "); IStructuredSelection selected = (IStructuredSelection)getSelection(); Iterator i = selected.iterator(); // the following is a tweak. Refresh only re-queries the children. If the selected item has no @@ -2199,7 +2200,7 @@ public class SystemView extends TreeViewer implements ISystemTree, if (doTimings) { timer.setEndTime(); - System.out.println("Time to refresh selected: " + timer); //$NON-NLS-1$ + System.out.println("Time to refresh selected: " + timer); } //else //{ @@ -2212,7 +2213,7 @@ public class SystemView extends TreeViewer implements ISystemTree, break; case EVENT_REFRESH_SELECTED_FILTER: if (debug) - logDebugMsg("SV event: EVENT_REFRESH_SELECTED_FILTER "); //$NON-NLS-1$ + logDebugMsg("SV event: EVENT_REFRESH_SELECTED_FILTER "); IStructuredSelection selectedItems= (IStructuredSelection)getSelection(); Iterator j = selectedItems.iterator(); // We climb up the tree here until we find a SystemFilterReference data member in the tree. @@ -2270,19 +2271,19 @@ public class SystemView extends TreeViewer implements ISystemTree, break; case EVENT_REFRESH_REMOTE: if (debug) - logDebugMsg("SV event: EVENT_REFRESH_REMOTE: src = "+src); //$NON-NLS-1$ + logDebugMsg("SV event: EVENT_REFRESH_REMOTE: src = "+src); refreshRemoteObject(src, parent, originatedHere); break; case EVENT_SELECT_REMOTE: if (debug) - logDebugMsg("SV event: EVENT_SELECT_REMOTE: src = "+src); //$NON-NLS-1$ + logDebugMsg("SV event: EVENT_SELECT_REMOTE: src = "+src); //remoteItemsToSkip = null; // reset selectRemoteObjects(src, (ISubSystem)null, parent); break; case EVENT_MOVE_MANY: if (debug) - logDebugMsg("SV event: EVENT_MOVE_MANY "); //$NON-NLS-1$ + logDebugMsg("SV event: EVENT_MOVE_MANY "); multiSource = _event.getMultiSource(); if ((multiSource == null) || (multiSource.length == 0)) return Status.OK_STATUS; @@ -2300,7 +2301,7 @@ public class SystemView extends TreeViewer implements ISystemTree, break; case EVENT_PROPERTY_CHANGE: if (debug) - logDebugMsg("SV event: EVENT_PROPERTY_CHANGE "); //$NON-NLS-1$ + logDebugMsg("SV event: EVENT_PROPERTY_CHANGE "); String[] allProps = {IBasicPropertyConstants.P_TEXT,IBasicPropertyConstants.P_IMAGE}; ISystemRemoteElementAdapter ra = getRemoteAdapter(src); if (ra != null) @@ -2313,38 +2314,38 @@ public class SystemView extends TreeViewer implements ISystemTree, break; case EVENT_PROPERTYSHEET_UPDATE: if (debug) - logDebugMsg("SV event: EVENT_PROPERTYSHEET_UPDATE "); //$NON-NLS-1$ + logDebugMsg("SV event: EVENT_PROPERTYSHEET_UPDATE "); updatePropertySheet(); break; case EVENT_MUST_COLLAPSE: if (debug) - logDebugMsg("SV event: EVENT_MUST_COLLAPSE "); //$NON-NLS-1$ + logDebugMsg("SV event: EVENT_MUST_COLLAPSE "); collapseNode(src, true); // collapse and flush gui widgets from memory break; case EVENT_COLLAPSE_ALL: if (debug) - logDebugMsg("SV event: EVENT_COLLAPSE_ALL "); //$NON-NLS-1$ + logDebugMsg("SV event: EVENT_COLLAPSE_ALL "); collapseAll(); // collapse all - if ((src!=null) && (src instanceof String) && ((String)src).equals("false")) // defect 41203 //$NON-NLS-1$ + if ((src!=null) && (src instanceof String) && ((String)src).equals("false")) // defect 41203 {} else refresh(); // flush gui widgets from memory break; case EVENT_COLLAPSE_SELECTED: // defect 41203 if (debug) - logDebugMsg("SV event: EVENT_COLLAPSE_SELECTED "); //$NON-NLS-1$ + logDebugMsg("SV event: EVENT_COLLAPSE_SELECTED "); collapseSelected(); break; case EVENT_EXPAND_SELECTED: // defect 41203 if (debug) - logDebugMsg("SV event: EVENT_EXPAND_SELECTED "); //$NON-NLS-1$ + logDebugMsg("SV event: EVENT_EXPAND_SELECTED "); expandSelected(); break; case EVENT_REVEAL_AND_SELECT: if (debug) - logDebugMsg("SV event: EVENT_REVEAL_AND_SELECT "); //$NON-NLS-1$ + logDebugMsg("SV event: EVENT_REVEAL_AND_SELECT "); parentItem = findItem(parent); if (parentItem == null) return Status.OK_STATUS; @@ -2378,7 +2379,7 @@ public class SystemView extends TreeViewer implements ISystemTree, break; case EVENT_SELECT: if (debug) - logDebugMsg("SV event: EVENT_SELECT "); //$NON-NLS-1$ + logDebugMsg("SV event: EVENT_SELECT "); item = findItem(src); if (item == null) // if not showing item, this is a no-op return Status.OK_STATUS; @@ -2386,7 +2387,7 @@ public class SystemView extends TreeViewer implements ISystemTree, break; case EVENT_SELECT_EXPAND: if (debug) - logDebugMsg("SV event: EVENT_SELECT_EXPAND "); //$NON-NLS-1$ + logDebugMsg("SV event: EVENT_SELECT_EXPAND "); item = findItem(src); if (item == null) // if not showing item, this is a no-op return Status.OK_STATUS; @@ -2830,11 +2831,11 @@ public class SystemView extends TreeViewer implements ISystemTree, protected String printTreeItem(Item item) { if (item == null) - return ""; //$NON-NLS-1$ + return ""; else if (item instanceof TreeItem) { TreeItem ti = (TreeItem)item; - return printTreeItem(ti.getParentItem()) + "/" + ti.getText(); //$NON-NLS-1$ + return printTreeItem(ti.getParentItem()) + "/" + ti.getText(); } else return item.toString(); @@ -3188,8 +3189,8 @@ public class SystemView extends TreeViewer implements ISystemTree, { if (debug) { - logDebugMsg("in doOurInternalRefresh on " + getAdapter(element).getName(element)); //$NON-NLS-1$ - logDebugMsg("...current selection is " + getFirstSelectionName(getSelection())); //$NON-NLS-1$ + logDebugMsg("in doOurInternalRefresh on " + getAdapter(element).getName(element)); + logDebugMsg("...current selection is " + getFirstSelectionName(getSelection())); } SystemElapsedTimer timer = null; if (doTimings) @@ -3203,7 +3204,7 @@ public class SystemView extends TreeViewer implements ISystemTree, updateItem(widget, element); if (doTimings) { - System.out.println("doOurInternalRefresh timer 1: time to updatePlus and updateItem:" + timer.setEndTime()); //$NON-NLS-1$ + System.out.println("doOurInternalRefresh timer 1: time to updatePlus and updateItem:" + timer.setEndTime()); timer.setStartTime(); } } @@ -3217,7 +3218,7 @@ public class SystemView extends TreeViewer implements ISystemTree, // newChildren = getRawChildren(widget); if (doTimings) { - System.out.println("doOurInternalRefresh timer 2: time to getRawChildren:" + timer.setEndTime()); //$NON-NLS-1$ + System.out.println("doOurInternalRefresh timer 2: time to getRawChildren:" + timer.setEndTime()); timer.setStartTime(); } } @@ -3230,7 +3231,7 @@ public class SystemView extends TreeViewer implements ISystemTree, if (doTimings) { - System.out.println("doOurInternalRefresh timer 3: time to updateChildren:" + timer.setEndTime()); //$NON-NLS-1$ + System.out.println("doOurInternalRefresh timer 3: time to updateChildren:" + timer.setEndTime()); timer.setStartTime(); } } @@ -3263,7 +3264,7 @@ public class SystemView extends TreeViewer implements ISystemTree, } if (doTimings) { - System.out.println("doOurInternalRefresh timer 4: time to recurse children:" + timer.setEndTime()); //$NON-NLS-1$ + System.out.println("doOurInternalRefresh timer 4: time to recurse children:" + timer.setEndTime()); timer.setStartTime(); } } @@ -3582,7 +3583,7 @@ public class SystemView extends TreeViewer implements ISystemTree, gatherExpandedChildren((fullRefresh ? null : currItem), currItem, expandedChildren); wasExpanded[idx] = true; if (doTimings) - System.out.println("Refresh Timer 1: time to gatherExpandedChildren: " + timer.setEndTime()); //$NON-NLS-1$ + System.out.println("Refresh Timer 1: time to gatherExpandedChildren: " + timer.setEndTime()); } else wasExpanded[idx] = false; @@ -3610,13 +3611,13 @@ public class SystemView extends TreeViewer implements ISystemTree, setExpanded(currItem, false); // collapse node if (doTimings) { - System.out.println("Refresh Timer 2: time to setExpanded(false): " + timer.setEndTime()); //$NON-NLS-1$ + System.out.println("Refresh Timer 2: time to setExpanded(false): " + timer.setEndTime()); timer.setStartTime(); } ourInternalRefresh(currItem, currItem.getData(), true, true, doTimings); // dispose of children, update plus if (doTimings) { - System.out.println("Refresh Timer 3: time to do ourInternalRefresh(...): " + timer.setEndTime()); //$NON-NLS-1$ + System.out.println("Refresh Timer 3: time to do ourInternalRefresh(...): " + timer.setEndTime()); timer.setStartTime(); } if (wasExpanded[idx]) @@ -3624,13 +3625,13 @@ public class SystemView extends TreeViewer implements ISystemTree, createChildren(currItem); // re-expand if (doTimings) { - System.out.println("Refresh Timer 4: time to createChildren(...): " + timer.setEndTime()); //$NON-NLS-1$ + System.out.println("Refresh Timer 4: time to createChildren(...): " + timer.setEndTime()); timer.setStartTime(); } currItem.setExpanded(true); if (doTimings) { - System.out.println("Refresh Timer 5: time to setExpanded(true): " + timer.setEndTime()); //$NON-NLS-1$ + System.out.println("Refresh Timer 5: time to setExpanded(true): " + timer.setEndTime()); timer.setStartTime(); } } @@ -3660,27 +3661,27 @@ public class SystemView extends TreeViewer implements ISystemTree, createChildren(item); ((TreeItem)item).setExpanded(true); if (debug) - System.out.println("Re-Expanded RemoteItem: " + itemToExpand.remoteName); //$NON-NLS-1$ + System.out.println("Re-Expanded RemoteItem: " + itemToExpand.remoteName); } else if (debug) - System.out.println("Re-Expand of RemoteItem '" + itemToExpand.remoteName + "' failed. Not found"); //$NON-NLS-1$ //$NON-NLS-2$ + System.out.println("Re-Expand of RemoteItem '" + itemToExpand.remoteName + "' failed. Not found"); } else { setExpandedState(itemToExpand.data, true); if (debug) - System.out.println("Re-Expanded non-remote Item: " + itemToExpand.data); //$NON-NLS-1$ + System.out.println("Re-Expanded non-remote Item: " + itemToExpand.data); } } if (doTimings) { - System.out.println("Refresh Timer 6: time to reExpanded expanded subnodes: " + timer.setEndTime()); //$NON-NLS-1$ + System.out.println("Refresh Timer 6: time to reExpanded expanded subnodes: " + timer.setEndTime()); timer.setStartTime(); } getControl().setRedraw(true); if (doTimings) { - System.out.println("Refresh Timer 7: time to setRedraw(true): " + timer.setEndTime()); //$NON-NLS-1$ + System.out.println("Refresh Timer 7: time to setRedraw(true): " + timer.setEndTime()); timer.setStartTime(); } } @@ -3801,13 +3802,13 @@ public class SystemView extends TreeViewer implements ISystemTree, subsystem = remoteAdapter.getSubSystem(data); areAnyRemote = true; if (debug) - System.out.println("ExpandedRemoteItem added. remoteName = " + remoteName); //$NON-NLS-1$ + System.out.println("ExpandedRemoteItem added. remoteName = " + remoteName); } else if (debug) - System.out.println("ExpandedItem added. Data = " + data); //$NON-NLS-1$ + System.out.println("ExpandedItem added. Data = " + data); } else if (debug) - System.out.println("ExpandedItem added. Data = null"); //$NON-NLS-1$ + System.out.println("ExpandedItem added. Data = null"); } boolean isRemote() { @@ -3901,7 +3902,7 @@ public class SystemView extends TreeViewer implements ISystemTree, eventType = "EVENT_CHANGE_FILTER_REFERENCE"; break; } - logDebugMsg("SV event: "+eventType); //$NON-NLS-1$ + logDebugMsg("SV event: "+eventType); } // STEP 1. ARE WE EVEN SHOWING THE GIVEN SUBSYSTEM? @@ -3921,7 +3922,7 @@ public class SystemView extends TreeViewer implements ISystemTree, if (widget != c && widget instanceof Item) { if (debug) - logDebugMsg("...Found ss " + ss); //$NON-NLS-1$ + logDebugMsg("...Found ss " + ss); item = internalFindReferencedItem(widget, filter, SEARCH_INFINITE); } @@ -3929,13 +3930,13 @@ public class SystemView extends TreeViewer implements ISystemTree, else if (widget == c) { if (debug) - logDebugMsg("...Din not find ss " + ss); //$NON-NLS-1$ + logDebugMsg("...Din not find ss " + ss); item = internalFindReferencedItem(widget, filter, SEARCH_INFINITE); } if (item == null) - logDebugMsg("......didn't find renamed/updated filter's reference!"); //$NON-NLS-1$ + logDebugMsg("......didn't find renamed/updated filter's reference!"); else { // STEP 3: UPDATE THAT FILTER... @@ -3972,11 +3973,11 @@ public class SystemView extends TreeViewer implements ISystemTree, { Item ssItem = (Item)item; if (debug) - logDebugMsg("...Found ss "+ss); //$NON-NLS-1$ + logDebugMsg("...Found ss "+ss); // STEP 2: ARE WE SHOWING A REFERENCE TO THE UPDATED FILTER STRING? item = internalFindReferencedItem(ssItem, filterString, SEARCH_INFINITE); if (item == null) - logDebugMsg("......didn't find updated filter string's reference!"); //$NON-NLS-1$ + logDebugMsg("......didn't find updated filter string's reference!"); else { // STEP 3: UPDATE THAT FILTER STRING... @@ -4076,7 +4077,7 @@ public class SystemView extends TreeViewer implements ISystemTree, } if (debug) - logDebugMsg("SV event: "+eventType); //$NON-NLS-1$ + logDebugMsg("SV event: "+eventType); //} //clearSelection(); @@ -4096,7 +4097,7 @@ public class SystemView extends TreeViewer implements ISystemTree, refresh(); if (debug) - logDebugMsg("...Did not find ss "+ss.getName()); //$NON-NLS-1$ + logDebugMsg("...Did not find ss "+ss.getName()); return; } Item ssItem = (Item)item; @@ -4107,7 +4108,7 @@ public class SystemView extends TreeViewer implements ISystemTree, Object parent = event.getParent(); if (debug) - logDebugMsg("...Found ss "+ss); //$NON-NLS-1$ + logDebugMsg("...Found ss "+ss); // STEP 2: ARE WE SHOWING A REFERENCE TO THE FILTER's PARENT POOL? Item parentRefItem = null; @@ -4132,7 +4133,7 @@ public class SystemView extends TreeViewer implements ISystemTree, if (parentRefItem != null) { if (debug) - logDebugMsg("......We are showing reference to parent"); //$NON-NLS-1$ + logDebugMsg("......We are showing reference to parent"); // STEP 3... YES, SO REFRESH PARENT... IT WILL RE-GEN THE FILTER REFERENCES FOR EACH CHILD FILTER // ... actually, call off the whole show if that parent is currently not expanded!! // HMMM... WE NEED TO REFRESH EVEN IF NOT EXPANDED IF ADDING FIRST CHILD @@ -4218,18 +4219,18 @@ public class SystemView extends TreeViewer implements ISystemTree, if (add && isSelected(parentRefItem.getData(),oldSelections)) { if (debug) - logDebugMsg(".........that parent was previously selected"); //$NON-NLS-1$ + logDebugMsg(".........that parent was previously selected"); // .... YES, SO SELECT NEW FILTER'S REFERENCE Item filterItem = (Item)internalFindReferencedItem(parentRefItem, afilterstring?(Object)filterstring:(Object)filter, 1); // start at filter's parent, search for filter if (filterItem == null) { if (debug) - logDebugMsg("Hmm, didn't find new filter's reference!"); //$NON-NLS-1$ + logDebugMsg("Hmm, didn't find new filter's reference!"); } else { if (debug) - logDebugMsg(".........Trying to set selection to " + filterItem.getData()); //$NON-NLS-1$ + logDebugMsg(".........Trying to set selection to " + filterItem.getData()); setSelection(new StructuredSelection(filterItem.getData()),true); } } @@ -4270,7 +4271,7 @@ public class SystemView extends TreeViewer implements ISystemTree, } else if (debug) - logDebugMsg("Did not find parent ref " + parent); //$NON-NLS-1$ + logDebugMsg("Did not find parent ref " + parent); } /** * Move existing items a given number of positions within the same node. @@ -4440,7 +4441,7 @@ public class SystemView extends TreeViewer implements ISystemTree, //recursiveFindAllRemoteItemReferences(parentItem, remoteObjectName, null, subsystem, matches); match = recursiveFindFirstRemoteItemReference(parentItem, remoteObjectName, null, subsystem); if (debugRemote) - System.out.println("Returning " + match + " from findFirstRemoteItemReference(1,2,3)"); //$NON-NLS-1$ //$NON-NLS-2$ + System.out.println("Returning " + match + " from findFirstRemoteItemReference(1,2,3)"); } //if (matches.size() > 0) // return (Item)matches.elementAt(0); @@ -4472,7 +4473,7 @@ public class SystemView extends TreeViewer implements ISystemTree, //recursiveFindAllRemoteItemReferences(parentItem, remoteObjectName, remoteObject, subsystem, matches); match = recursiveFindFirstRemoteItemReference(parentItem, remoteObjectName, remoteObject, subsystem); if (debugRemote) - System.out.println("Returning " + match + " from findFirstRemoteItemReference(1,2)"); //$NON-NLS-1$ //$NON-NLS-2$ + System.out.println("Returning " + match + " from findFirstRemoteItemReference(1,2)"); } //if (matches.size() > 0) @@ -4567,19 +4568,19 @@ public class SystemView extends TreeViewer implements ISystemTree, Item match = null; if (debugRemote) { - System.out.println("Inside internalFindFirstRemoteItemReference for searchString: "+searchString+", subsystem null? " + (subsystem==null) + ", nbr roots = " + roots.length); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + System.out.println("Inside internalFindFirstRemoteItemReference for searchString: "+searchString+", subsystem null? " + (subsystem==null) + ", nbr roots = " + roots.length); } for (int idx=0; (match==null) && (idx - * Return true if the page is complete and has no errors - */ - public boolean isPageComplete(); - - /** - * Return the subsystem factory that supplied this page - */ - public ISubSystemConfiguration getSubSystemConfiguration(); -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSEDefaultNewConnectionWizardDelegate.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSEDefaultNewConnectionWizardDelegate.java index 24dee579a44..d9b63fccf81 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSEDefaultNewConnectionWizardDelegate.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSEDefaultNewConnectionWizardDelegate.java @@ -23,13 +23,14 @@ import org.eclipse.jface.wizard.IWizardPage; import org.eclipse.rse.core.IRSESystemType; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.SystemPerspectiveHelpers; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage; +import org.eclipse.rse.core.model.ISystemProfile; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter; import org.eclipse.rse.model.DummyHost; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemProfile; -import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.SystemStartHere; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; @@ -294,7 +295,7 @@ public class RSEDefaultNewConnectionWizardDelegate extends RSENewConnectionWizar { ok = subsystemFactorySuppliedWizardPages[idx].performFinish(); if (!ok) - getWizard().setPageError(subsystemFactorySuppliedWizardPages[idx]); + getWizard().setPageError((IWizardPage)subsystemFactorySuppliedWizardPages[idx]); } } if (ok) @@ -447,7 +448,7 @@ public class RSEDefaultNewConnectionWizardDelegate extends RSENewConnectionWizar { ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)factories[idx].getAdapter(ISubSystemConfigurationAdapter.class); - IWizardPage[] pages = adapter.getNewConnectionWizardPages(factories[idx], getWizard()); + ISystemNewConnectionWizardPage[] pages = adapter.getNewConnectionWizardPages(factories[idx], getWizard()); if (pages != null) { for (int widx=0; widx0)) { - IWizardPage previousPage = mainPage; + IWizardPage previousPage = mainPage; for (int idx=0; idx - * Subclass this and override what you wish to change. - */ -public class SystemFilterNamingPolicy implements IRSEFilterNamingPolicy, ISystemFilterConstants -{ - - protected String managerFileNamePrefix, poolFolderNamePrefix, poolFolderNameSuffix, - poolFileNamePrefix, filterFileNamePrefix, - referenceManagerFileNamePrefix; - /** - * Default prefix for filter pool manager persisted file: "filterPools_" - */ - public static final String DEFAULT_FILENAME_PREFIX_FILTERPOOLMANAGER = "filterPools_"; - /** - * Default prefix for filter pool reference manager persisted file: "filterPoolRefs_" - */ - public static final String DEFAULT_FILENAME_PREFIX_FILTERPOOLREFERENCEMANAGER = "filterPoolRefs_"; - /** - * Default prefix for filter pool persisted file: "filterPool_" - */ - public static final String DEFAULT_FILENAME_PREFIX_FILTERPOOL = "filterPool_"; - /** - * Default prefix for filter persisted file: "filter_" - */ - public static final String DEFAULT_FILENAME_PREFIX_FILTER = "filter_"; - /** - * Default prefix for filter pool folder: "FilterPool_" - */ - public static final String DEFAULT_FOLDERNAME_PREFIX_FILTERPOOL = "FilterPool_"; - - - /** - * Factory method to return an instance populated with defaults. - * Can then simply override whatever is desired. - */ - public static IRSEFilterNamingPolicy getNamingPolicy() - { - return new SystemFilterNamingPolicy(); - } - - /** - * Constructor for SystemFilterNamingPolicyImpl - */ - public SystemFilterNamingPolicy() - { - super(); - } - - /** - * Get the unqualified save file name for the given SystemFilterPoolManager object. - * Do NOT include the extension, as .xmi will be added. - *

- * Returns "filterPools_"+managerName by default. - */ - public String getManagerSaveFileName(String managerName) - { - return DEFAULT_FILENAME_PREFIX_FILTERPOOLMANAGER+managerName; - } - /** - * Get the unqualified save file name for the given SystemFilterPoolReferenceManager object. - * Do NOT include the extension, as .xmi will be added. - *

- * Returns "filterPoolRefs_"+managerName by default. - */ - public String getReferenceManagerSaveFileName(String managerName) - { - return DEFAULT_FILENAME_PREFIX_FILTERPOOLREFERENCEMANAGER+managerName; - } - /** - * Get the unqualified save file name for the given SystemFilterPool object. - * Do NOT include the extension, as .xmi will be added. - *

- * Returns getFilterPoolSaveFileNamePrefix()+poolName by default. - */ - public String getFilterPoolSaveFileName(String poolName) - { - return getFilterPoolSaveFileNamePrefix()+poolName; - } - /** - * Get the file name prefix for all pool files. - * Used to deduce the saved pools by examining the file system - *

- * By default returns "filterPool_" - */ - public String getFilterPoolSaveFileNamePrefix() - { - return DEFAULT_FILENAME_PREFIX_FILTERPOOL; - } - /** - * Get the folder name for the given SystemFilterPool object. - *

- * Returns getFilterPoolFolderNamePrefix()+poolName by default. - */ - public String getFilterPoolFolderName(String poolName) - { - return getFilterPoolFolderNamePrefix()+poolName; - } - /** - * Get the folder name prefix for all pool folders. - * Used to deduce the saved pools by examining the file system - *

- * By default returns "FilterPool_" - */ - public String getFilterPoolFolderNamePrefix() - { - return DEFAULT_FOLDERNAME_PREFIX_FILTERPOOL; - } - /** - * Get the unqualified save file name for the given SystemFilter object. - * Do NOT include the extension, as .xmi will be added. - *

- * Returns getFilterSaveFileNamePrefix()+filterName by default. - */ - public String getFilterSaveFileName(String filterName) - { - return getFilterSaveFileNamePrefix()+filterName; - } - /** - * Get the file name prefix for all filter files. - * Used to deduce the saved filters by examining the file system - *

- * Returns "Filter_" by default. - */ - public String getFilterSaveFileNamePrefix() - { - return DEFAULT_FILENAME_PREFIX_FILTER; - } -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterPool.java b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterPool.java deleted file mode 100644 index d9926c33e78..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterPool.java +++ /dev/null @@ -1,1327 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.internal.filters; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.Vector; - -import org.eclipse.core.resources.IFolder; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.core.runtime.Platform; -import org.eclipse.rse.core.SystemResourceHelpers; -import org.eclipse.rse.core.filters.IRSEFilterNamingPolicy; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterConstants; -import org.eclipse.rse.filters.ISystemFilterContainer; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.filters.ISystemFilterSavePolicies; -import org.eclipse.rse.internal.references.SystemPersistableReferencedObject; -import org.eclipse.rse.ui.RSEUIPlugin; -import org.eclipse.rse.ui.SystemResources; - -/** - * This is a system filter pool, which is a means of grouping filters - * and managing them as a list. - *

- * To enable filters themselves to be automous and sharable, it is decided - * that no data will be persisted in the filter pool itself. Rather, all - * attributes other than the list of filters are transient and as such it is - * the responsibility of the programmer using a filter pool to set these - * attributes after creating or restoring a filter pool. Typically, this is - * what a filter pool manager (SystemFilterPoolManager) will do for you. - */ -/** - * @lastgen class SystemFilterPoolImpl extends SystemPersistableReferencedObjectImpl implements SystemFilterPool, SystemFilterSavePolicies, SystemFilterConstants, SystemFilterContainer, IAdaptable - */ -public class SystemFilterPool extends SystemPersistableReferencedObject - implements ISystemFilterPool, ISystemFilterSavePolicies, ISystemFilterConstants, ISystemFilterContainer, IAdaptable -{ - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - private String name; - /** - * The default value of the '{@link #getType() Type}' attribute. - * - * - * @see #getType() - * @generated - * @ordered - */ - protected static final String TYPE_EDEFAULT = null; - - private int savePolicy; - private IRSEFilterNamingPolicy namingPolicy = null; - private ISystemFilterPoolManager mgr; - private SystemFilterContainerCommonMethods helpers = null; - private Object filterPoolData = null; - private boolean initialized = false; - protected boolean specialCaseNoDataRestored = false; - private boolean debug = false; - protected static final String DELIMITER = SystemFilterPoolReference.DELIMITER; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String type = TYPE_EDEFAULT; - /** - * The default value of the '{@link #isSupportsNestedFilters() Supports Nested Filters}' attribute. - * - * - * @see #isSupportsNestedFilters() - * @generated - * @ordered - */ - protected static final boolean SUPPORTS_NESTED_FILTERS_EDEFAULT = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected boolean supportsNestedFilters = SUPPORTS_NESTED_FILTERS_EDEFAULT; - /** - * The default value of the '{@link #isDeletable() Deletable}' attribute. - * - * - * @see #isDeletable() - * @generated - * @ordered - */ - protected static final boolean DELETABLE_EDEFAULT = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected boolean deletable = DELETABLE_EDEFAULT; - /** - * The default value of the '{@link #isDefault() Default}' attribute. - * - * - * @see #isDefault() - * @generated - * @ordered - */ - protected static final boolean DEFAULT_EDEFAULT = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected boolean default_ = DEFAULT_EDEFAULT; - /** - * The default value of the '{@link #isStringsCaseSensitive() Strings Case Sensitive}' attribute. - * - * - * @see #isStringsCaseSensitive() - * @generated - * @ordered - */ - protected static final boolean STRINGS_CASE_SENSITIVE_EDEFAULT = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected boolean stringsCaseSensitive = STRINGS_CASE_SENSITIVE_EDEFAULT; - /** - * This is true if the Strings Case Sensitive attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean stringsCaseSensitiveESet = false; - - /** - * The default value of the '{@link #isSupportsDuplicateFilterStrings() Supports Duplicate Filter Strings}' attribute. - * - * - * @see #isSupportsDuplicateFilterStrings() - * @generated - * @ordered - */ - protected static final boolean SUPPORTS_DUPLICATE_FILTER_STRINGS_EDEFAULT = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected boolean supportsDuplicateFilterStrings = SUPPORTS_DUPLICATE_FILTER_STRINGS_EDEFAULT; - /** - * The default value of the '{@link #getRelease() Release}' attribute. - * - * - * @see #getRelease() - * @generated - * @ordered - */ - protected static final int RELEASE_EDEFAULT = 0; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected int release = RELEASE_EDEFAULT; - /** - * The default value of the '{@link #isSingleFilterStringOnly() Single Filter String Only}' attribute. - * - * - * @see #isSingleFilterStringOnly() - * @generated - * @ordered - */ - protected static final boolean SINGLE_FILTER_STRING_ONLY_EDEFAULT = false; - - /** - * The cached value of the '{@link #isSingleFilterStringOnly() Single Filter String Only}' attribute. - * - * - * @see #isSingleFilterStringOnly() - * @generated - * @ordered - */ - protected boolean singleFilterStringOnly = SINGLE_FILTER_STRING_ONLY_EDEFAULT; - - /** - * This is true if the Single Filter String Only attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean singleFilterStringOnlyESet = false; - - /** - * The default value of the '{@link #getOwningParentName() Owning Parent Name}' attribute. - * - * - * @see #getOwningParentName() - * @generated - * @ordered - */ - protected static final String OWNING_PARENT_NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getOwningParentName() Owning Parent Name}' attribute. - * - * - * @see #getOwningParentName() - * @generated - * @ordered - */ - protected String owningParentName = OWNING_PARENT_NAME_EDEFAULT; - - /** - * The default value of the '{@link #isNonRenamable() Non Renamable}' attribute. - * - * - * @see #isNonRenamable() - * @generated - * @ordered - */ - protected static final boolean NON_RENAMABLE_EDEFAULT = false; - - /** - * The cached value of the '{@link #isNonRenamable() Non Renamable}' attribute. - * - * - * @see #isNonRenamable() - * @generated - * @ordered - */ - protected boolean nonRenamable = NON_RENAMABLE_EDEFAULT; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected java.util.List filters = null; -/** - * Default constructor - */ - protected SystemFilterPool() - { - super(); - helpers = new SystemFilterContainerCommonMethods(); - } - /** - * Static factory method for creating a new filter pool. Will - * first try to restore it, and if that fails will create a new instance and - * return it. - *

- * Use this method only if you are not using a SystemFilterPoolManager, else - * use the createSystemFilterPool method in that class. - * - * @param mofHelpers SystemMOFHelpers object with helper methods for saving and restoring via mof - * @param poolFolder the folder that will hold the filter pool. - * This folder will be created if it does not already exist. - * @param name the name of the filter pool. Typically this is also the name - * of the given folder, but this is not required. For the save policy of one file - * per pool, the name of the file is derived from this. - * @param allowNestedFilters true if filters inside this filter pool are - * to allow nested filters. - * @param isDeletable true if this filter pool is allowed to be deleted by users. - * @param tryToRestore true to attempt a restore first, false if a pure create operation. - * @param savePolicy The save policy for the filter pool and filters. One of the - * following constants from the SystemFilterConstants interface: - *

    - *
  • SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL - one file and folder per pool - *
  • SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER - one file per pool, all files in one folder - *
  • SAVE_POLICY_ONE_FILE_PER_FILTER - one file per filter, one folder per pool - *
- * @param namingPolicy The names to use for file and folders when persisting to disk. Pass - * null to just use the defaults. - */ - public static ISystemFilterPool createSystemFilterPool( - String name, - boolean allowNestedFilters, - boolean isDeletable, - boolean tryToRestore) - { - - - SystemFilterPool pool = null; - if (tryToRestore) - { - try - { - pool = (SystemFilterPool)RSEUIPlugin.getThePersistenceManager().restoreFilterPool(name); - } - catch (Exception exc) // real error trying to restore, versus simply not found. - { - // todo: something? Log the exception somewhere? - } - } - if (pool == null) // not found or some serious error. - { - pool = createPool(); - } - if (pool != null) - { - pool.initialize(name, allowNestedFilters, isDeletable); - } - return pool; - } - - // temporary! - //public boolean isSharable() {return isSharable; } - //public void setIsSharable(boolean is) { isSharable = is; } - - /* - * Private helper method. - * Uses MOF to create an instance of this class. - */ - protected static SystemFilterPool createPool() - { - ISystemFilterPool pool = new SystemFilterPool(); - // FIXME SystemFilterImpl.initMOF().createSystemFilterPool(); - pool.setRelease(SystemResources.CURRENT_RELEASE); - return (SystemFilterPool)pool; - } - - /* - * Private helper method to initialize attributes - */ - protected void initialize(String name, - boolean allowNestedFilters, - boolean isDeletable) - { - if (!initialized) - initialize(name, savePolicy, namingPolicy); - setDeletable(isDeletable); // mof attribute - //System.out.println("In initialize() for filter pool " + getName() + ". isDeletable= " + isDeletable); - setSupportsNestedFilters(allowNestedFilters); // cascades to each filter - } - - /* - * Private helper method to core initialization, from either createXXX or restore. - */ - protected void initialize(String name, - int savePolicy, IRSEFilterNamingPolicy namingPolicy) - { - setName(name); // mof attribute - setSavePolicy(savePolicy); - setNamingPolicy(namingPolicy); - - initialized = true; - } - - - //protected Vector internalGetFilters() - protected java.util.List internalGetFilters() - { - //return filters; - return getFilters(); // mof-supplied in parent class - } - - /** - * Return the caller which instantiated the filter pool manager overseeing this filter framework instance - */ - public ISystemFilterPoolManagerProvider getProvider() - { - ISystemFilterPoolManager mgr = getSystemFilterPoolManager(); - if (mgr != null) - return mgr.getProvider(); - else - return null; - } - - /** - * Set the save file policy. See constants in {@link org.eclipse.rse.filters.ISystemFilterConstants SystemFilterConstants}. - * One of: - *
    - *
  • SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL - one file and folder per pool - *
  • SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER - one file per pool, all files in one folder - *
  • SAVE_POLICY_ONE_FILE_PER_FILTER - one file per filter, one folder per pool - *
- * This method is called by the SystemFilterPoolManager. - */ - public void setSavePolicy(int policy) - { - if (this.savePolicy != policy) - { - this.savePolicy = policy; - setDirty(true); - } - } - - /** - * Set the naming policy used when saving data to disk. - * @see org.eclipse.rse.core.filters.IRSEFilterNamingPolicy - */ - public void setNamingPolicy(IRSEFilterNamingPolicy namingPolicy) - { - if (this.namingPolicy != namingPolicy) - { - this.namingPolicy = namingPolicy; - setDirty(true); - } - } - - /** - * Get the naming policy currently used when saving data to disk. - * @see org.eclipse.rse.core.filters.IRSEFilterNamingPolicy - */ - public IRSEFilterNamingPolicy getNamingPolicy() - { - return namingPolicy; - } - - /** - * Set whether filters in this pool support nested filters. - * Important to note this is stored in every filter as well as this filter pool. - */ - public void setSupportsNestedFilters(boolean supports) - { - this.setSupportsNestedFiltersGen(supports); - ISystemFilter[] filters = getSystemFilters(); - if (filters != null) - for (int idx=0; idx - * - * @generated - */ - public void setSupportsNestedFiltersGen(boolean newSupportsNestedFilters) - { - supportsNestedFilters = newSupportsNestedFilters; - } - - /** - * Set whether filters in this pool support duplicate filter strings. - * Important to note this is stored in every filter as well as this filter pool. - */ - public void setSupportsDuplicateFilterStrings(boolean supports) - { - setSupportsDuplicateFilterStringsGen(supports); - ISystemFilter[] filters = getSystemFilters(); - if (filters != null) - for (int idx=0; idx - * - * @generated - */ - public void setSupportsDuplicateFilterStringsGen(boolean newSupportsDuplicateFilterStrings) - { - supportsDuplicateFilterStrings = newSupportsDuplicateFilterStrings; - setDirty(true); - } - - /** - * Set whether filters in this pool support case-sensitive filter strings. - * Important to note this is stored in every filter as well as this filter pool. - */ - public void setStringsCaseSensitive(boolean supports) - { - this.setStringsCaseSensitiveGen(supports); - ISystemFilter[] filters = getSystemFilters(); - if (filters != null) - for (int idx=0; idx - * - * @generated - */ - public void setStringsCaseSensitiveGen(boolean newStringsCaseSensitive) - { - stringsCaseSensitive = newStringsCaseSensitive; - stringsCaseSensitiveESet = true; - setDirty(true); - } - - /** - * Set the filter pool manager. Called by SystemFilterPoolManager - */ - public void setSystemFilterPoolManager(ISystemFilterPoolManager mgr) - { - this.mgr = mgr; - } - /** - * Return the filter pool manager managing this collection of filter pools and their filters. - */ - public ISystemFilterPoolManager getSystemFilterPoolManager() - { - return mgr; - } - - /** - * While setData is for global data to set in all objects in the filter framework, - * this is to set transient data that only the filter pool holds. - */ - public void setSystemFilterPoolData(Object data) - { - this.filterPoolData = data; - } - - /** - * Return transient data set via setFilterPoolData. - */ - public Object getSystemFilterPoolData() - { - return filterPoolData; - } - - public String getId() - { - return getProvider().getId(); - } - - /** - * @see ISystemFilterPool#getName() - */ - public String getName() - { - return name; - } - - public String getDescription() - { - return SystemResources.RESID_MODELOBJECTS_FILTERPOOL_DESCRIPTION; - } - - /** - * Set the name of this filter pool. - */ - public void setName(String name) - { - if (this.name == null || !this.name.equals(name) ) - { - this.name = name; - setDirty(true); - } - } - - /** - * Returns the type attribute. Intercepted to return SystemFilterConstants.DEFAULT_TYPE if it is currently null - * Allows tools to have typed filter pools - */ - public String getType() - { - String type = this.getTypeGen(); - if (type == null) - return ISystemFilterConstants.DEFAULT_TYPE; - else - return type; - } - /** - * @generated This field/method will be replaced during code generation - * Allows tools to have typed filter pools - */ - public String getTypeGen() - { - return type; - } - - /** - * - * - * @generated - */ - public boolean isDeletable() - { - return deletable; - } - - /** - * - * - * @generated - */ - public void setDeletable(boolean newDeletable) - { - deletable = newDeletable; - setDirty(true); - } - - /** - * - * - * @generated - */ - public boolean isDefault() - { - return default_; - } - - /** - * - * - * @generated - */ - public void setDefault(boolean newDefault) - { - default_ = newDefault; - } - - /** - * Does this support nested filters? Calls mof-generated isSupportsNestedFilters. - */ - public boolean supportsNestedFilters() - { - return isSupportsNestedFilters(); - } - /** - * Does this support duplicate filter strings? Calls mof-generated isSupportsDuplicateFilterStrings. - */ - public boolean supportsDuplicateFilterStrings() - { - return isSupportsDuplicateFilterStrings(); - } - /** - * @return The value of the StringsCaseSensitive attribute - * Are filter strings in this filter case sensitive? - * If not set locally, queries the parent filter pool manager's atttribute. - */ - public boolean isStringsCaseSensitive() - { - if (!isSetStringsCaseSensitive()) - return getSystemFilterPoolManager().isStringsCaseSensitive(); - else - return stringsCaseSensitive; - } - /** - * Same as isStringsCaseSensitive() - * @return The value of the StringsCaseSensitive attribute - */ - public boolean areStringsCaseSensitive() - { - return isStringsCaseSensitive(); - } - /** - * Clone this filter pools' attributes and filters into another filter pool. - * Assumes the core attributes were already set when filter pool was created: - *
    - *
  • Name - *
  • Deletable - *
  • Supports nested filters - *
  • Manager - *
- * Attributes we clone: - *
    - *
  • Data - *
  • Type - *
  • Default - *
  • Case sensitive - *
  • Supports duplicate filter strings - *
  • Release - *
- */ - public void cloneSystemFilterPool(ISystemFilterPool targetPool) - throws Exception - { - //System.out.println("In SystemFilterPoolImpl#cloneSystemFilterPool. targetPool null? " + (targetPool == null)); - if (filterPoolData != null) - targetPool.setSystemFilterPoolData(filterPoolData); - - //String ourType = getTypeGen(); - //if (ourType != null) - // targetPool.setType(ourType); - targetPool.setType(getType()); - - targetPool.setDeletable(isDeletable()); - targetPool.setSupportsNestedFilters(isSupportsNestedFilters()); - - //Boolean ourDefault = getDefault(); - //if (ourDefault != null) - // targetPool.setDefault(ourDefault); - targetPool.setDefault(isDefault()); - - targetPool.setSupportsDuplicateFilterStrings(supportsDuplicateFilterStrings()); - targetPool.setRelease(getRelease()); - //targetPool.setNonDeletable(isNonDeletable()); - targetPool.setNonRenamable(isNonRenamable()); - targetPool.setOwningParentName(getOwningParentName()); - if (isSetSingleFilterStringOnly()) - targetPool.setSingleFilterStringOnly(isSingleFilterStringOnly()); - if (isSetStringsCaseSensitive()) - targetPool.setStringsCaseSensitive(isStringsCaseSensitive()); - - - ISystemFilter[] filters = getSystemFilters(); - if ((filters!=null) && (filters.length>0)) - { - for (int idx=0; idx - *
  • supportsNestedFilters - *
  • supportsDuplicateFilterStrings - *
  • stringsCaseSensitive - * - * @param aliasName The name to give the new filter. Must be unique for this pool. - * @param filterStrings The list of String objects that represent the filter strings. - */ - public ISystemFilter createSystemFilter(String aliasName, Vector filterStrings) - { - ISystemFilter newFilter = helpers.createSystemFilter(internalGetFilters(), this, aliasName, filterStrings); - newFilter.setSupportsNestedFilters(supportsNestedFilters()); - newFilter.setStringsCaseSensitive(areStringsCaseSensitive()); - newFilter.setSupportsDuplicateFilterStrings(supportsDuplicateFilterStrings()); - setDirty(true); - return newFilter; - } - - /** - * Return Vector of String objects: the names of existing filters in this container. - * Needed by name validators for New and Rename actions to verify new name is unique. - */ - public Vector getSystemFilterNames() - { - return helpers.getSystemFilterNames(internalGetFilters()); - } - - /** - * Return the nested filters as a Vector - */ - public Vector getSystemFiltersVector() - { - return helpers.getSystemFiltersVector(internalGetFilters()); - } - /** - * Return how many filters are defined in this filter container - */ - public int getSystemFilterCount() - { - return helpers.getSystemFilterCount(internalGetFilters()); - } - /** - * Return a filter object, given its aliasname. - * Can be used to test if an aliasname is already used (non-null return). - * @param aliasName unique aliasName (case insensitive) to search on. - * @return SystemFilter object with unique aliasName, or null if - * no filter object with this name exists. - */ - public ISystemFilter getSystemFilter(String aliasName) - { - return helpers.getSystemFilter(internalGetFilters(), aliasName); - } - /** - * Adds given filter to the list. - *

    PLEASE NOTE: - *

      - *
    • createSystemFilter calls this method for you! - *
    • this is a no-op if a filter with the same aliasname already exists - *
    - * @param filter SystemFilter object to add - * @return true if added, false if filter with this aliasname already existed. - */ - public boolean addSystemFilter(ISystemFilter filter) - { - boolean result = helpers.addSystemFilter(internalGetFilters(),filter); - if (result) setDirty(true); - return result; - } - /** - * Removes a given filter from the list. - * @param filter SystemFilter object to remove - */ - public void deleteSystemFilter(ISystemFilter filter) - { - helpers.deleteSystemFilter(internalGetFilters(),filter); - setDirty(true); - } - - /** - * Rename a given filter in the list. - * @param filter SystemFilter object to remove - */ - public void renameSystemFilter(ISystemFilter filter, String newName) - { - helpers.renameSystemFilter(internalGetFilters(),filter, newName); - setDirty(true); - } - - /** - * Updates a given filter in the list. - * @param filter SystemFilter object to update - * @param newName New name to assign it. Assumes unique checking already done. - * @param newStrings New strings to assign it. Replaces current strings. - */ - public void updateSystemFilter(ISystemFilter filter, String newName, String[] newStrings) - { - helpers.updateSystemFilter(internalGetFilters(), filter, newName, newStrings); - setDirty(true); - } - - /** - * Duplicates a given filter in the list. - * @param filter SystemFilter object to clone - * @param alias New, unique, alias name to give this filter. Clone will fail if this is not unique. - */ - public ISystemFilter cloneSystemFilter(ISystemFilter filter, String aliasName) - { - ISystemFilter result = helpers.cloneSystemFilter(internalGetFilters(), filter, aliasName); - setDirty(true); - return result; - } - - /** - * Return a given filter's zero-based location - */ - public int getSystemFilterPosition(ISystemFilter filter) - { - return helpers.getSystemFilterPosition(internalGetFilters(),filter); - } - - /** - * Move a given filter to a given zero-based location - */ - public void moveSystemFilter(int pos, ISystemFilter filter) - { - helpers.moveSystemFilter(internalGetFilters(),pos,filter); - setDirty(true); - } - - /** - * This is the method required by the IAdaptable interface. - * Given an adapter class type, return an object castable to the type, or - * null if this is not possible. - */ - public Object getAdapter(Class adapterType) - { - return Platform.getAdapterManager().getAdapter(this, adapterType); - } - - /** - * Private helper method to deduce filter names from disk files. - * Will populate and return a list. - * Only makes sense to use if the save policy is one file per filter. - */ - protected static Vector deduceFilterNames(IFolder folder, IRSEFilterNamingPolicy namingPolicy) - { - Vector filterNames = SystemResourceHelpers.getResourceHelpers().convertToVectorAndStrip( - SystemResourceHelpers.getResourceHelpers().listFiles(folder, - namingPolicy.getFilterSaveFileNamePrefix(), - SAVEFILE_SUFFIX), - namingPolicy.getFilterSaveFileNamePrefix(), SAVEFILE_SUFFIX); - return filterNames; - } - - - - /** - * Order filters according to user preferences. - *

    - * While the framework has all the code necessary to arrange filters and save/restore - * that arrangement, you may choose to use preferences instead of this support. - * In this case, call this method and pass in the saved and sorted filter name list. - *

    - * Called by someone after restore. - */ - public void orderSystemFilters(String[] names) - { - java.util.List filterList = internalGetFilters(); - ISystemFilter[] filters = new ISystemFilter[names.length]; - for (int idx=0; idx - *

  • SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL - one file and folder per pool - *
  • SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER - one file per pool, all files in one folder - *
  • SAVE_POLICY_ONE_FILE_PER_FILTER - one file per filter, one folder per pool - * - * @param namingPolicy The names to use for file and folders when persisting to disk. Pass - * null to just use the defaults. - * @return SystemFilterPool object if restored ok, null if error encountered. If null, call getLastException(). - * @see org.eclipse.rse.filters.ISystemFilterConstants - */ - protected static ISystemFilterPool restore(String name, int savePolicy, - IRSEFilterNamingPolicy namingPolicy) - throws Exception - { - if (namingPolicy == null) - namingPolicy = SystemFilterNamingPolicy.getNamingPolicy(); - - // FIXME SystemFilterImpl.initMOF(); // to be safe - - ISystemFilterPool pool = null; - SystemFilterPool poolImpl = null; - /* FIXME - switch(savePolicy) - { - case SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL: - pool = restoreFromOneFile(mofHelpers, folder, name, namingPolicy, true); - poolImpl = (SystemFilterPoolImpl)pool; - break; - - case SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER: - pool = restoreFromOneFile(mofHelpers, folder, name, namingPolicy, true); - poolImpl = (SystemFilterPoolImpl)pool; - break; - - case SAVE_POLICY_ONE_FILE_PER_FILTER: - pool = restoreFromOneFile(mofHelpers, folder, name, namingPolicy, false); // restore data part - poolImpl = (SystemFilterPoolImpl)pool; - //pool = createPool(); - - poolImpl.setFolder(folder); // SystemFilter's restore will query it - pool.setNamingPolicy(namingPolicy); // SystemFilter's restore will query it - Vector filterNames = deduceFilterNames(folder, namingPolicy); - if (filterNames != null) - { - Exception lastException = null; - for (int idx=0; idx - * As required by the {@link org.eclipse.rse.core.references.IRSEBasePersistableReferencedObject IRSEPersistableReferencedObject} - * interface. - */ - public String getReferenceName() - { - return getSystemFilterPoolManager().getName()+DELIMITER+getName(); - } - - // ----------------------- - // HOUSEKEEPING METHODS... - // ----------------------- - /* */ - public String toString() - { - return getName(); - } - /** - * @generated This field/method will be replaced during code generation. - */ - public void setType(String newType) - { - type = newType; - setDirty(true); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public boolean isSupportsNestedFilters() - { - return supportsNestedFilters; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void unsetStringsCaseSensitive() - { - stringsCaseSensitive = STRINGS_CASE_SENSITIVE_EDEFAULT; - stringsCaseSensitiveESet = false; - setDirty(true); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean isSetStringsCaseSensitive() - { - return stringsCaseSensitiveESet; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public java.util.List getFilters() - { - if (filters == null) - { - filters = new ArrayList(); - //FIXME new EObjectContainmenteList(SystemFilter.class, this, FiltersPackage.SYSTEM_FILTER_POOL__FILTERS); - } - return filters; - } - - /** - * @generated This field/method will be replaced during code generation - */ - public boolean isSupportsDuplicateFilterStrings() - { - return supportsDuplicateFilterStrings; - } - - /** - * @generated This field/method will be replaced during code generation - * In what release was this created? Typically, will be the version and release - * times 10, as in 40 or 51. - */ - public int getRelease() - { - return release; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setRelease(int newRelease) - { - release = newRelease; - setDirty(true); - } - - /** - * Returns true if this filter is limited to a single filter string. If not set here, - * it is queried from the parent manager. - */ - public boolean isSingleFilterStringOnly() - { - if (isSetSingleFilterStringOnly()) - return singleFilterStringOnly; - else - return getSystemFilterPoolManager().isSingleFilterStringOnly(); - } - /** - * - * - * @generated - */ - public boolean isSingleFilterStringOnlyGen() - { - return singleFilterStringOnly; - } - - /** - * - * - * @generated - */ - public void setSingleFilterStringOnly(boolean newSingleFilterStringOnly) - { - singleFilterStringOnly = newSingleFilterStringOnly; - singleFilterStringOnlyESet = true; - setDirty(true); - } - - /** - * - * - * @generated - */ - public void unsetSingleFilterStringOnly() - { - singleFilterStringOnly = SINGLE_FILTER_STRING_ONLY_EDEFAULT; - singleFilterStringOnlyESet = false; - setDirty(true); - } - - /** - * - * - * @generated - */ - public boolean isSetSingleFilterStringOnly() - { - return singleFilterStringOnlyESet; - } - - /** - * - * - * @generated - */ - public String getOwningParentName() - { - return owningParentName; - } - - /** - * - * - * @generated - */ - public void setOwningParentName(String newOwningParentName) - { - if (newOwningParentName != owningParentName) - { - owningParentName = newOwningParentName; - setDirty(true); - } - } - - /** - * - * - * @generated - */ - public boolean isNonRenamable() - { - return nonRenamable; - } - - /** - * - * - * @generated - */ - public void setNonRenamable(boolean newNonRenamable) - { - boolean oldNonRenamable = nonRenamable; - if (oldNonRenamable!= newNonRenamable) - { - nonRenamable = newNonRenamable; - setDirty(true); - } - } - - public boolean commit() - { - return RSEUIPlugin.getThePersistenceManager().commit(this); - } - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterPoolManager.java b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterPoolManager.java deleted file mode 100644 index 30af579ffa4..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterPoolManager.java +++ /dev/null @@ -1,1965 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.internal.filters; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.Vector; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IFolder; -import org.eclipse.rse.core.filters.IRSEFilterNamingPolicy; -import org.eclipse.rse.core.references.IRSEBaseReferencingObject; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterConstants; -import org.eclipse.rse.filters.ISystemFilterContainer; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.filters.ISystemFilterPoolReference; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; -import org.eclipse.rse.filters.ISystemFilterString; -import org.eclipse.rse.logging.Logger; -import org.eclipse.rse.model.ISystemProfile; -import org.eclipse.rse.persistence.IRSEPersistenceManager; -import org.eclipse.rse.ui.RSEUIPlugin; - -// -// - -/** - * A filter pool manager manages filter pools. - *

    - * Each filter pool that is managed becomes a folder on disk. - *

    - * To create a filter pool manager instance, use the factory method - * in SystemFilterPoolManagerImpl in the ...impl package. - * You must pass a folder that represents the anchor point for the - * pools managed by this manager instance. - *

    - * Depending on your tools' needs, you have four choices about how - * the filter pools and filters are persisted to disk. The decision is - * made at the time you instantiate the pool manager and is one of the - * following constants from the SystemFilterConstants interface: - *

      - *
    • SAVE_POLICY_ONE_FILE_PER_MANAGER - one file: mgrName.xmi - *
    • SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL - one file and folder per pool - *
    • SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER - one file per pool, all files in one folder - *
    • SAVE_POLICY_ONE_FILE_PER_FILTER - one file per filter, one folder per pool - *
    - *

    - * With the policy of one file per pool, there are two possibilities regarding - * the folder structure: - *

      - *
    • Each pool gets its own subfolder, and the pool's xmi file goes in - * the pool's unique subfolder: SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL - *
    • There are no subfolders per pool, all the xmi pool files go in the - * same folder as specified when creating this manager instance: - * SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER - *
    - *

    - * With the policy of one file per filter, each filter pool must have its own folder. - *

    - * With an instantiated filter pool manager (most tools will only need - * one such instance), you now simply call its methods to work with - * filter pools. For example, use it to: - *

      - *
    • Restore all filter pools from disk - *
    • Save all, or individual, filter pools to disk - *
    • Get a list of existing filter pools - *
    • Create filter pools - *
    • Delete filter pools - *
    • Clone filter pools - *
    • Rename filter pools - *
    • Save all, or individual, filter pools - *
    - * All the underlying file system work is handled for you. - *

    - * Further, this is the front door for working with filters too. By forcing all - * filter related activity through a single point like this, we can ensure that - * all changes are saved to disk, and events are fired properly. - *

    - * The filter framework logs to a {@link org.eclipse.rse.logging.Logger Logger} file. - * By default the log in the org.eclipse.rse.core plugin is used, but you can change this - * by calling {@link #setLogger(org.eclipse.rse.logging.Logger)}. - */ -/** - * @lastgen class SystemFilterPoolManagerImpl Impl implements SystemFilterPoolManager {} - */ -public class SystemFilterPoolManager implements ISystemFilterPoolManager -{ - private ISystemFilterPool[] poolArray = null; // cache for performance - private ISystemFilterPoolManagerProvider caller = null; - private Object poolMgrData; - private Vector poolNames; - private boolean initialized = false; - - private boolean suspendCallbacks = false; - private boolean suspendSave = false; - private Logger logger = null; - private ISystemProfile _profile; - - // persistence - protected boolean _isDirty = true; - private boolean _wasRestored = false; - - public static boolean debug = true; - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - - protected String name = NAME_EDEFAULT; - /** - * The default value of the '{@link #isSupportsNestedFilters() Supports Nested Filters}' attribute. - * - * - * @see #isSupportsNestedFilters() - * @generated - * @ordered - */ - protected static final boolean SUPPORTS_NESTED_FILTERS_EDEFAULT = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected boolean supportsNestedFilters = SUPPORTS_NESTED_FILTERS_EDEFAULT; - /** - * The default value of the '{@link #isStringsCaseSensitive() Strings Case Sensitive}' attribute. - * - * - * @see #isStringsCaseSensitive() - * @generated - * @ordered - */ - protected static final boolean STRINGS_CASE_SENSITIVE_EDEFAULT = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected boolean stringsCaseSensitive = STRINGS_CASE_SENSITIVE_EDEFAULT; - /** - * The default value of the '{@link #isSupportsDuplicateFilterStrings() Supports Duplicate Filter Strings}' attribute. - * - * - * @see #isSupportsDuplicateFilterStrings() - * @generated - * @ordered - */ - protected static final boolean SUPPORTS_DUPLICATE_FILTER_STRINGS_EDEFAULT = false; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected boolean supportsDuplicateFilterStrings = SUPPORTS_DUPLICATE_FILTER_STRINGS_EDEFAULT; - /** - * This is true if the Supports Duplicate Filter Strings attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean supportsDuplicateFilterStringsESet = false; - - /** - * The default value of the '{@link #isSingleFilterStringOnly() Single Filter String Only}' attribute. - * - * - * @see #isSingleFilterStringOnly() - * @generated - * @ordered - */ - protected static final boolean SINGLE_FILTER_STRING_ONLY_EDEFAULT = false; - - /** - * The cached value of the '{@link #isSingleFilterStringOnly() Single Filter String Only}' attribute. - * - * - * @see #isSingleFilterStringOnly() - * @generated - * @ordered - */ - protected boolean singleFilterStringOnly = SINGLE_FILTER_STRING_ONLY_EDEFAULT; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected java.util.List pools = null; - - - /** - * Constructor - */ - protected SystemFilterPoolManager(ISystemProfile profile) - { - super(); - _profile = profile; - } - - public ISystemProfile getSystemProfile() - { - return _profile; - } - - /** - * Factory to create a filter pool manager. - * @param logger A logging object into which to log errors as they happen in the framework - * @param caller Objects which instantiate this class should implement the - * SystemFilterPoolManagerProvider interface, and pass "this" for this parameter. - * Given any filter framework object, it is possible to retrieve the caller's - * object via the getProvider method call. - * @param mgrFolder the folder that will be the manager folder. This is - * the parent of the filter pool folders the manager folder will hold, or the single - * xmi file for the save policy of one file per manager. This folder will be created - * if it does not already exist. - * @param name the name of the filter pool manager. Typically this is also the name - * of the given folder, but this is not required. For the save policy of one file - * per manager, the name of the file is derived from this. For other save policies, - * the name is not used. - * @param allowNestedFilters true if filters inside filter pools in this manager are - * to allow nested filters. This is the default, but can be overridden at the - * individual filter pool level. - * @param savePolicy The save policy for the filter pools and filters. One of the - * following constants from the - * {@link org.eclipse.rse.filters.ISystemFilterConstants SystemFilterConstants} interface: - *

      - *
    • SAVE_POLICY_NONE - no files, all save/restore handled elsewhere - *
    • SAVE_POLICY_ONE_FILE_PER_MANAGER - one file: mgrName.xmi - *
    • SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL - one file and folder per pool - *
    • SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER - one file per pool, all files in one folder - *
    • SAVE_POLICY_ONE_FILE_PER_FILTER - one file per filter, one folder per pool - *
    - * @param namingPolicy The names to use for file and folders when persisting to disk. Pass - * null to just use the defaults, or if using SAVE_POLICY_NONE. - */ - public static ISystemFilterPoolManager - createSystemFilterPoolManager(ISystemProfile profile, Logger logger, - ISystemFilterPoolManagerProvider caller, - String name, - boolean allowNestedFilters, - int savePolicy, IRSEFilterNamingPolicy namingPolicy) - { - - SystemFilterPoolManager mgr = null; - if (namingPolicy == null) - namingPolicy = SystemFilterNamingPolicy.getNamingPolicy(); - try - { - mgr = (SystemFilterPoolManager)RSEUIPlugin.getThePersistenceManager().restoreFilterPoolManager(profile, logger, caller, name); - /* - if (savePolicy != SystemFilterConstants.SAVE_POLICY_NONE) - mgr = (SystemFilterPoolManagerImpl)restore(; - */ - } - catch (Exception exc) // real error trying to restore, versus simply not found. - { - // todo: something. Log the exception somewhere? - } - if (mgr == null) // not found or some serious error. - { - mgr = createManager(profile); - } - if (mgr != null) - { - mgr.initialize(logger, caller, name, allowNestedFilters); - } - return mgr; - } - - /* - * Private helper method. - * Uses MOF to create an instance of this class. - */ - public static SystemFilterPoolManager createManager(ISystemProfile profile) - { - ISystemFilterPoolManager mgr = new SystemFilterPoolManager(profile); - - //FIXME SystemFilterImpl.initMOF().createSystemFilterPoolManager(); - return (SystemFilterPoolManager)mgr; - } - - /* - * Private helper method to initialize state - */ - public void initialize(Logger logger, ISystemFilterPoolManagerProvider caller, String name, - boolean allowNestedFilters) - { - if (!initialized) - initialize(logger, caller, name); // core data - - { - java.util.List pools = getPools(); - ISystemFilterPool pool = null; - Vector poolNames = getSystemFilterPoolNamesVector(); - for (int idx=0; idx - * - * @generated - */ - public void setSupportsDuplicateFilterStringsGen(boolean newSupportsDuplicateFilterStrings) - { - supportsDuplicateFilterStrings = newSupportsDuplicateFilterStrings; - supportsDuplicateFilterStringsESet = true; - } - - /** - * - * - * @generated - */ - public boolean isStringsCaseSensitive() - { - return stringsCaseSensitive; - } - - /** - * Same as isStringsCaseSensitive() - * Are filter strings in this filter case sensitive? - * @return The value of the StringsCaseSensitive attribute - */ - public boolean areStringsCaseSensitive() - { - return isStringsCaseSensitive(); - } - /** - * Set attribute indicating if filters managed by this manager support case-sensitive filter strings, by default. - * Cascaded down to all pools, and all filters in all pools. - * Alternatively, just call it on the particular pool or filter it applies to. - */ - public void setStringsCaseSensitive(boolean newStringsCaseSensitive) - { - // as generated by emf... - setStringsCaseSensitiveGen(newStringsCaseSensitive); - // our special code... - ISystemFilterPool[] pools = getSystemFilterPools(); - for (int idx=0; idx - * - * @generated - */ - public void setStringsCaseSensitiveGen(boolean newStringsCaseSensitive) - { - stringsCaseSensitive = newStringsCaseSensitive; - } - - /** - * Set transient variable pointing back to us. Called after restoring. - * Cascaded down to all pools, and all filters in all pools. - */ - protected void setFilterPoolManager() - { - ISystemFilterPool[] pools = getSystemFilterPools(); - for (int idx=0; idx - * Does the following: - *
      - *
    • Removes all references - *
    • Removes pool object from in-memory model - *
    • Removes folder from disk for policies of one folder per pool - *
    • Removes file from disk for policy of one file per pool - *
    • Saves model to disk for policy of one file per manager - *
    • Invalidates in-memory caches - *
    • Calls back to inform caller of this event - *
    - * @param pool The filter pool object to physically delete - */ - public void deleteSystemFilterPool(ISystemFilterPool pool) - throws Exception - { - - - - // remove all references - IRSEBaseReferencingObject[] refs = pool.getReferencingObjects(); - //boolean needsSave = false; - if (refs != null) - { - for (int idx=0; idx < refs.length; idx++) - { - if (refs[idx] instanceof ISystemFilterPoolReference) - { - ISystemFilterPoolReference fpRef = (ISystemFilterPoolReference)refs[idx]; - ISystemFilterPoolReferenceManager fprMgr = fpRef.getFilterPoolReferenceManager(); - if (fprMgr != null) - fprMgr.removeSystemFilterPoolReference(fpRef,false);// false means don't dereference - } - } - } - // DWD removing a pool should mark its parent profile as dirty and cause a save to be "scheduled" - - // remove from model - java.util.List pools = getPools(); - pools.remove(pool); - - /* FIXME - // now in EMF, the pools are "owned" by the Resource, and only referenced by this pool manager, - // so I don't think just removing it from the manager is enough... it must also be removed from its - // resource. Phil. - Resource res = pool.eResource(); - if (res != null) - res.getContents().remove(pool); - - // remove from disk - if ( (savePolicy == SystemFilterConstants.SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL) || - (savePolicy == SystemFilterConstants.SAVE_POLICY_ONE_FILE_PER_FILTER) ) - { - String expectedFolderName = derivePoolFolderName(poolName); - if (expectedFolderName.equals(poolFolder.getName())) - { - // folder name equals what we would have named it if left to us. - // assumption is this folder only exists to hold this pool! - if (poolFolder.exists()) - getResourceHelpers().deleteResource(poolFolder); - } - } - else if (savePolicy == SystemFilterConstants.SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER) - { - String poolFileName = SystemFilterPoolImpl.getSaveFileName(getMOFHelpers(),pool); - IFile poolFile = SystemResourceHelpers.getResourceHelpers().getFile(poolFolder,poolFileName); - if (poolFile.exists()) - getResourceHelpers().deleteResource(poolFile); - } - else // all pools in one file per manager. Just save it - { - commit(); - } - invalidatePoolCache(); - // if caller provider, callback to inform them of this event - if ((caller != null) && !suspendCallbacks) - caller.filterEventFilterPoolDeleted(pool); - */ - } - - /** - * Delete all existing filter pools. Call this when you are about to delete this manager, say. - */ - public void deleteAllSystemFilterPools() - { - ISystemFilterPool[] allPools = getSystemFilterPools(); - for (int idx=0; idx - * Does the following: - *
      - *
    • Updates all referencing objects - *
    • Renames pool object in the in-memory model - *
    • Renames folder on disk for policies of one folder per pool - *
    • Renames file on disk for policy of one file per pool - *
    • Saves model to disk for policy of one file per manager - *
    • Invalidates in-memory caches - *
    • Calls back to provider to inform of this event. - *
    - * @param pool The filter pool object to physically rename - * @param newName The new name to give the pool - */ - public void renameSystemFilterPool(ISystemFilterPool pool, String newName) - throws Exception - { - /* - * DWD Renaming a filter pool should mark its parent profile as dirty and - * the pool itself as dirty. A rewrite of the profile should be scheduled. - */ - - String oldName = pool.getName(); - // rename on disk - /* FIXME - int oldLen = oldName.length(); - int newLen = newName.length(); - if ( (savePolicy == SystemFilterConstants.SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL) || - (savePolicy == SystemFilterConstants.SAVE_POLICY_ONE_FILE_PER_FILTER) ) - { - String expectedFolderName = derivePoolFolderName(pool.getName()); - boolean ourFolderName = expectedFolderName.equals(pool.getFolder().getName()); - // we must rename the old file... - String poolFileName = SystemFilterPoolImpl.getSaveFileName(getMOFHelpers(),pool); - String poolFileNewName = SystemFilterPoolImpl.getSaveFileName(getMOFHelpers(),pool,newName); - IFile poolFile = getResourceHelpers().getFile(pool.getFolder(),poolFileName); - IFolder poolFolder = pool.getFolder(); - - // first, pre-test for file-in-use error: - boolean inUse = poolFile.exists() && SystemResourceHelpers.testIfResourceInUse(poolFile); - if (inUse) - { - SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_FILE_INUSE); - msg.makeSubstitution(poolFile.getFullPath()); - throw new SystemMessageException(msg); - } - // next, pre-test for folder-in-use error: - if (ourFolderName) - { - inUse = poolFolder.exists() && SystemResourceHelpers.testIfResourceInUse(poolFolder); - if (inUse) - { - SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_FOLDER_INUSE); - msg.makeSubstitution(poolFolder.getFullPath()); - throw new SystemMessageException(msg); - } - } - - if (poolFile.exists()) - { - // pre-test if the new name will be too long for MOF (256) - if (nameLenDiff > 0) - { - if (ourFolderName) - nameLenDiff *= 2; // new name affects folder and file - int newNameLen = poolFile.getLocation().toOSString().length() + nameLenDiff; - if (newNameLen > 256) - throw new Exception("Fully qualified filter pool name too long for "+newName+". Exceeds 256 characters"); - } - getResourceHelpers().renameResource(poolFile, poolFileNewName); - } - if (ourFolderName) - { - // folder name equals what we would have named it if left to us. - // assumption is this folder only exists to hold this pool! - if (poolFolder.exists()) - { - String newFolderName = derivePoolFolderName(newName); - getResourceHelpers().renameResource(poolFolder, newFolderName); - // as we now know, the original IFolder still points to the old name! - poolFolder = getResourceHelpers().getRenamedFolder(poolFolder, newFolderName); - pool.setFolder(poolFolder); - } - } - } - else if (savePolicy == SystemFilterConstants.SAVE_POLICY_ONE_FILE_PER_POOL_SAME_FOLDER) - { - String poolFileName = SystemFilterPoolImpl.getSaveFileName(getMOFHelpers(),pool); - IFile poolFile = getResourceHelpers().getFile(pool.getFolder(),poolFileName); - // first, pre-test for file-in-use error: - boolean inUse = poolFile.exists() && SystemResourceHelpers.testIfResourceInUse(poolFile); - if (inUse) - { - SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_FILE_INUSE); - msg.makeSubstitution(poolFile.getFullPath()); - throw new SystemMessageException(msg); - } - if (poolFile.exists()) - { - String poolFileNewName = SystemFilterPoolImpl.getSaveFileName(getMOFHelpers(),pool,newName); - getResourceHelpers().renameResource(poolFile, poolFileNewName); - } - } - */ - pool.setName(newName); - invalidatePoolCache(); - - // inform all referencees - IRSEBaseReferencingObject[] refs = pool.getReferencingObjects(); - if (refs != null) - { - for (int idx=0; idx < refs.length; idx++) - { - IRSEBaseReferencingObject ref = refs[idx]; - if (ref instanceof ISystemFilterPoolReference) - { - ISystemFilterPoolReference fpRef = (ISystemFilterPoolReference)ref; - ISystemFilterPoolReferenceManager fprMgr = fpRef.getFilterPoolReferenceManager(); - fprMgr.renameReferenceToSystemFilterPool(pool); - } - } - } - - // if caller provider, callback to inform them of this event - if ((caller != null) && !suspendCallbacks) - caller.filterEventFilterPoolRenamed(pool,oldName); - } - - /** - * Copy the specified filter pool from this manager to this manager or another manager. - *

    - * Does the following: - *

      - *
    • Clones all filters within the pool - *
    • Clones all filter strings within each filter - *
    • Asks target manager to save to disk - *
    • Calls back to target manager provider, unless callbacks are suspended - *
    - * @param targetMgr The target manager to copy our filter pool to. Can be this manager, but target pool name must be unique. - * @param oldPool The filter pool to copy - * @param newName The new name to give the copied pool - * @return the new copy - */ - public ISystemFilterPool copySystemFilterPool(ISystemFilterPoolManager targetMgr, ISystemFilterPool oldPool, String newName) - throws Exception - { - ISystemFilterPool newPool = targetMgr.createSystemFilterPool(newName, oldPool.isDeletable()); - //System.out.println("In SystemFilterPoolManagerImpl#copySystemFilterPool: newPool "+newName+" null? " + (newPool == null)); - oldPool.cloneSystemFilterPool(newPool); - commit(newPool); // save it all to disk - return newPool; - } - - /** - * Move the specified filter pool from this manager to another manager. - *

    - * Does the following: - *

      - *
    • Performs a {@link #copySystemFilterPool(ISystemFilterPoolManager, ISystemFilterPool, String) copySystemFilterPool} operation. - *
    • If copy is successful, updates all references to reference the new copy. - *
    • If copy is successful, deletes original filter pool in this manager - *
    • If this final delete fails, deletes the copied version and restore original references - *
    • Asks target manager to save to disk - *
    • Saves this manager to disk - *
    • Calls back to both targer manager provider and this manager provider, unless callbacks are suspended - *
    - * @param targetMgr The target manager to move our filter pool to. Cannot be this manager. - * @param oldPool The filter pool to move - * @param newName The new name to give the moved pool - * @return the new copy of the moved system filter pool - */ - public ISystemFilterPool moveSystemFilterPool(ISystemFilterPoolManager targetMgr, ISystemFilterPool oldPool, String newName) - throws Exception - { - ISystemFilterPool newPool = copySystemFilterPool(targetMgr, oldPool, newName); - // find all references to original, and reset them to reference the new... - IRSEBaseReferencingObject[] refs = oldPool.getReferencingObjects(); - if (refs != null) - { - for (int idx=0; idx < refs.length; idx++) - { - if (refs[idx] instanceof ISystemFilterPoolReference) - { - ISystemFilterPoolReference fpRef = (ISystemFilterPoolReference)refs[idx]; - //SystemFilterPool fp = fpRef.getReferencedFilterPool(); - ISystemFilterPoolReferenceManager fprMgr = fpRef.getFilterPoolReferenceManager(); - fprMgr.resetSystemFilterPoolReference(fpRef, newPool); // reset the referenced pool - } - } - } - try - { - deleteSystemFilterPool(oldPool); - } - catch (Exception exc) - { - if (refs != null) - { - for (int idx=0; idx < refs.length; idx++) - { - if (refs[idx] instanceof ISystemFilterPoolReference) - { - ISystemFilterPoolReference fpRef = (ISystemFilterPoolReference)refs[idx]; - ISystemFilterPoolReferenceManager fprMgr = fpRef.getFilterPoolReferenceManager(); - fprMgr.resetSystemFilterPoolReference(fpRef, oldPool); // reset the referenced pool - } - } - } - targetMgr.deleteSystemFilterPool(newPool); - throw exc; - } - return newPool; - } - - /** - * Copy all filter pools from this manager to another manager. - *

    - * Does the following: - *

      - *
    • Clones all filter pools - *
    • Clones all filters within each pool - *
    • Clones all filter strings within each filter - *
    • Asks target manager to save to disk - *
    • Does not callback to caller to fire events, assumes caller doesn't want to know - *
    - * @param targetMgr The target manager to copy our filter pools to - */ - public void copySystemFilterPools(ISystemFilterPoolManager targetMgr) - throws Exception - { - targetMgr.setStringsCaseSensitive(areStringsCaseSensitive()); - ISystemFilterPool[] pools = getSystemFilterPools(); - if ((pools!=null) && (pools.length>0)) - { - targetMgr.suspendCallbacks(true); - //boolean oldSuspendCallbacks = suspendCallbacks; - for (int idx=0;idxCalls back to inform provider of this event (filterEventFilterCreated) - * @param parent The parent which is either a SystemFilterPool or a SystemFilter - * @param aliasName The name to give the new filter. Must be unique for this pool. - * @param filterStrings The list of String objects that represent the filter strings. - */ - public ISystemFilter createSystemFilter(ISystemFilterContainer parent, - String aliasName, Vector filterStrings) - throws Exception - { - ISystemFilter newFilter = null; - ISystemFilterPool parentPool = null; - if (parent instanceof ISystemFilterPool) - parentPool = (ISystemFilterPool)parent; - else - parentPool = ((ISystemFilter)parent).getParentFilterPool(); - newFilter = parent.createSystemFilter(aliasName,filterStrings); - if (!suspendSave) - commit(parentPool); - // if caller provider, callback to inform them of this event - if ((caller != null) && !suspendCallbacks) - caller.filterEventFilterCreated(newFilter); - return newFilter; - } - /** - * Creates a new system filter that is typed. - * Same as {@link #createSystemFilter(ISystemFilterContainer, String, Vector)} but - * takes a filter type as an additional parameter. - *

    - * A filter's type is an arbitrary string that is not interpreted or used by the base framework. This - * is for use entirely by tools who wish to support multiple types of filters and be able to launch unique - * actions per type, say. - * - * @param parent The parent which is either a SystemFilterPool or a SystemFilter - * @param aliasName The name to give the new filter. Must be unique for this pool. - * @param filterStrings The list of String objects that represent the filter strings. - * @param type The type of this filter - */ - public ISystemFilter createSystemFilter(ISystemFilterContainer parent, - String aliasName, Vector filterStrings, String type) - throws Exception - { - boolean oldSuspendSave = suspendSave; - boolean oldSuspendCallbacks = suspendCallbacks; - suspendSave = true; - suspendCallbacks = true; - - ISystemFilter newFilter = createSystemFilter(parent, aliasName, filterStrings); - newFilter.setType(type); - - suspendSave = oldSuspendSave; - suspendCallbacks = oldSuspendCallbacks; - - if (!suspendSave) - { - ISystemFilterPool parentPool = null; - if (parent instanceof ISystemFilterPool) - parentPool = (ISystemFilterPool)parent; - else - parentPool = ((ISystemFilter)parent).getParentFilterPool(); - commit(parentPool); - } - // if caller provider, callback to inform them of this event - if ((caller != null) && !suspendCallbacks) - caller.filterEventFilterCreated(newFilter); - return newFilter; - } - /** - * Creates a new system filter that is typed and promptable - * Same as {@link #createSystemFilter(ISystemFilterContainer, String ,Vector, String)} but - * takes a boolean indicating if it is promptable. - *

    - * A promptable filter is one in which the user is prompted for information at expand time. - * There is no base filter framework support for this, but tools can query this attribute and - * do their own thing at expand time. - * - * @param parent The parent which is either a SystemFilterPool or a SystemFilter - * @param aliasName The name to give the new filter. Must be unique for this pool. - * @param filterStrings The list of String objects that represent the filter strings. - * @param type The type of this filter - * @param promptable Pass true if this is a promptable filter - */ - public ISystemFilter createSystemFilter(ISystemFilterContainer parent, - String aliasName, Vector filterStrings, String type, boolean promptable) - throws Exception - { - boolean oldSuspendSave = suspendSave; - boolean oldSuspendCallbacks = suspendCallbacks; - suspendSave = true; - suspendCallbacks = true; - - ISystemFilter newFilter = createSystemFilter(parent, aliasName, filterStrings, type); - newFilter.setPromptable(promptable); - - suspendSave = oldSuspendSave; - suspendCallbacks = oldSuspendCallbacks; - - if (!suspendSave) - { - ISystemFilterPool parentPool = null; - if (parent instanceof ISystemFilterPool) - parentPool = (ISystemFilterPool)parent; - else - parentPool = ((ISystemFilter)parent).getParentFilterPool(); - commit(parentPool); - } - // if caller provider, callback to inform them of this event - if ((caller != null) && !suspendCallbacks) - caller.filterEventFilterCreated(newFilter); - return newFilter; - } - - /** - * Delete an existing system filter. - * Does the following: - *

      - *
    • Removes filter from its parent in memory. - *
    • If appropriate for the save policy, deletes the filter's file from disk. - *
    • Save the SystemFilterPool which direct or indirectly contains the filter. - *
    • Calls back to provider to inform it of this event (filterEventFilterDeleted) - *
    - */ - public boolean deleteSystemFilter(ISystemFilter filter) - throws Exception - { - - // ok to proceed... - boolean ok = true; - ISystemFilterContainer parent = filter.getParentFilterContainer(); - parent.deleteSystemFilter(filter); - commit(filter.getParentFilterPool()); - - // if caller provider, callback to inform them of this event - if ((caller != null) && !suspendCallbacks) - caller.filterEventFilterDeleted(filter); - return ok; - } - /** - * Renames a filter. This is better than filter.setName(String newName) as it - * saves the parent pool to disk. - *

    - * Does the following: - *

      - *
    • Renames the object in the in-memory cache - *
    • If appropriate for the save policy, rename's the filter's file on disk. - *
    • Save parent filter pool's in-memory object to disk. - *
    • Calls back to provider to inform it of this event (filterEventFilterRenamed) - *
    - * Does fire an event. - */ - public void renameSystemFilter(ISystemFilter filter, String newName) - throws Exception - { - - // ok to proceed - ISystemFilterContainer parent = filter.getParentFilterContainer(); - String oldName = filter.getName(); - parent.renameSystemFilter(filter, newName); - // rename on disk - try - { - - commit(filter.getParentFilterPool()); - } - catch (Exception exc) - { - parent.renameSystemFilter(filter, oldName); // rollback name change - throw exc; - } - // if caller provider, callback to inform them of this event - if ((caller != null) && !suspendCallbacks) - caller.filterEventFilterRenamed(filter,oldName); - } - - /** - * Updates a filter. This is better than doing it directly as it saves it to disk. - *

    - * Does the following: - *

      - *
    • Updates the object in the in-memory cache - *
    • Save parent filter pool's in-memory object to disk. - *
    • Calls back to provider to inform it of this event (filterEventFilterUpdated). - *
    - */ - public void updateSystemFilter(ISystemFilter filter, String newName, String[] strings) - throws Exception - { - - // ok to proceed... - ISystemFilterContainer parent = filter.getParentFilterContainer(); - String oldName = filter.getName(); - boolean rename = !oldName.equals(newName); - if (rename) - { - renameSystemFilter(filter, newName); - } - parent.updateSystemFilter(filter, newName, strings); - ISystemFilterPool parentPool = filter.getParentFilterPool(); - commit(parentPool); - if ((caller != null) && !suspendCallbacks) - caller.filterEventFilterUpdated(filter); - } - - /** - * Sets a filter's type. This is better than calling filter.setType(String) directly as it saves the filter to disk after. - *

    - * A filter's type is an arbitrary string that is not interpreted or used by the base framework. This - * is for use entirely by tools who wish to support multiple types of filters and be able to launch unique - * actions per type, say. - * @param parent The parent which is either a SystemFilterPool or a SystemFilter - * @param type The type of this filter - */ - public void setSystemFilterType(ISystemFilter filter, String newType) - throws Exception - { - filter.setType(newType); - commit(filter.getParentFilterPool()); - } - - /** - * Copy a system filter to a pool in this or another filter manager. - */ - public ISystemFilter copySystemFilter(ISystemFilterPool targetPool, ISystemFilter oldFilter, String newName) - throws Exception - { - ISystemFilterPoolManager targetMgr = targetPool.getSystemFilterPoolManager(); - ISystemFilterPool oldPool = oldFilter.getParentFilterPool(); - - targetMgr.suspendCallbacks(true); - - ISystemFilter newFilter = oldPool.copySystemFilter(targetPool, oldFilter, newName); // creates it in memory - commit(targetPool); // save updated pool to disk - - targetMgr.suspendCallbacks(false); - - targetMgr.getProvider().filterEventFilterCreated(newFilter); - return newFilter; - } - /** - * Move a system filter to a pool in this or another filter manager. - * Does this by first copying the filter, and only if successful, deleting the old copy. - */ - public ISystemFilter moveSystemFilter(ISystemFilterPool targetPool, ISystemFilter oldFilter, String newName) - throws Exception - { - ISystemFilter newFilter = copySystemFilter(targetPool, oldFilter, newName); - if (newFilter != null) - { - deleteSystemFilter(oldFilter); - } - return newFilter; - } - - /** - * Return the zero-based position of a SystemFilter object within its container - */ - public int getSystemFilterPosition(ISystemFilter filter) - { - ISystemFilterContainer container = filter.getParentFilterContainer(); - int position = -1; - boolean match = false; - ISystemFilter[] filters = container.getSystemFilters(); - - for (int idx = 0; !match && (idx - *

    - * Does the following: - *

      - *
    • After the move, the pool containing the filter is saved to disk. - *
    • Calls back to provider to inform of this event - *
    - * @param filters Array of SystemFilters to move. - * @param newPosition new zero-based position for the filters (filterEventFiltersRePositioned) - */ - public void moveSystemFilters(ISystemFilter filters[], int delta) - throws Exception - { - /* - * DWD revisit this. Make sure that the pool is scheduled to be saved. - */ -// ISystemFilterContainer container = filters[0].getParentFilterContainer(); - int[] oldPositions = new int[filters.length]; - for (int idx=0; idx 0) // moving down, process backwards - for (int idx=filters.length-1; idx>=0; idx--) - moveFilter(filters[idx], oldPositions[idx]+delta); - else - for (int idx=0; idx - * While the framework has all the code necessary to arrange filters and save/restore - * that arrangement, you may choose to use preferences instead of this support. - * In this case, call this method and pass in the saved and sorted filter name list. - *

    - * Called by someone after restore. - */ - public void orderSystemFilters(ISystemFilterPool pool, String[] names) throws Exception - { - pool.orderSystemFilters(names); - commit(pool); - } - - // ------------------------------- - // SYSTEM FILTER STRING METHODS... - // ------------------------------- - /** - * Append a new filter string to the given filter's list - *

    - * Does the following: - *

      - *
    • Adds the filter string to the in-memory cache - *
    • Saves parent filter pool to disk. - *
    • Calls back to provider to inform it of this event (filterEventFilterStringCreated) - *
    - */ - public ISystemFilterString addSystemFilterString(ISystemFilter filter, String newString) throws Exception - { - ISystemFilterString newFilterString = filter.addFilterString(newString); - ISystemFilterPool parentPool = filter.getParentFilterPool(); - commit(parentPool); - if ((caller != null) && !suspendCallbacks) - caller.filterEventFilterStringCreated(newFilterString); - return newFilterString; - } - /** - * Insert a new filter string to the its filters' list, at the given zero-based position - *

    - * Does the following: - *

      - *
    • Adds the filter string to the in-memory cache - *
    • Saves parent filter pool to disk. - *
    • Calls back to provider to inform it of this event (filterEventFilterStringCreated) - *
    - */ - public ISystemFilterString addSystemFilterString(ISystemFilter filter, String newString, int position) throws Exception - { - ISystemFilterString newFilterString = filter.addFilterString(newString, position); - ISystemFilterPool parentPool = filter.getParentFilterPool(); - commit(parentPool); - if ((caller != null) && !suspendCallbacks) - caller.filterEventFilterStringCreated(newFilterString); - return newFilterString; - } - /** - * Delete a filter string from the given filter's list - *

    - * Does the following: - *

      - *
    • Removes the filter string from the in-memory cache - *
    • Saves parent filter pool to disk. - *
    • Calls back to provider to inform it of this event (filterEventFilterStringDeleted) - *
    - * @return true if given string was found and hence was deleted. - */ - public boolean removeSystemFilterString(ISystemFilter filter, String oldString) throws Exception - { - ISystemFilterString oldFilterString = filter.removeFilterString(oldString); - if (oldFilterString == null) - return false; - ISystemFilterPool parentPool = filter.getParentFilterPool(); - commit(parentPool); - if ((caller != null) && !suspendCallbacks) - caller.filterEventFilterStringDeleted(oldFilterString); - return true; - } - /** - * Remove a filter string from this filter's list, given its SystemFilterString object. - *

    - * Does the following: - *

      - *
    • Removes the filter string from the in-memory cache - *
    • Saves parent filter pool to disk. - *
    • Calls back to provider to inform it of this event (filterEventFilterStringDeleted) - *
    - * @return true if the given string existed and hence was deleted. - */ - public boolean removeSystemFilterString(ISystemFilter filter, ISystemFilterString filterString) throws Exception - { - boolean ok = filter.removeFilterString(filterString); - if (!ok) - return false; - ISystemFilterPool parentPool = filter.getParentFilterPool(); - commit(parentPool); - if ((caller != null) && !suspendCallbacks) - caller.filterEventFilterStringDeleted(filterString); - return ok; - } - /** - * Remove a filter string from the given filter's list, given its zero-based position - *

    - * Does the following: - *

      - *
    • Removes the filter string from the in-memory cache - *
    • Saves parent filter pool to disk. - *
    • Calls back to provider to inform it of this event (filterEventFilterStringDeleted) - *
    - * @return true if a string existed at the given position and hence was deleted. - */ - public boolean removeSystemFilterString(ISystemFilter filter, int position) throws Exception - { - ISystemFilterString oldFilterString = filter.removeFilterString(position); - if (oldFilterString == null) - return false; - ISystemFilterPool parentPool = filter.getParentFilterPool(); - commit(parentPool); - if ((caller != null) && !suspendCallbacks) - caller.filterEventFilterStringDeleted(oldFilterString); - return true; - } - /** - * Update a filter string's string vale - *

    - * Does the following: - *

      - *
    • Update the filter string in the in-memory cache - *
    • Saves parent filter pool to disk. - *
    • Calls back to provider to inform it of this event (filterEventFilterStringUpdated) - *
    - */ - public void updateSystemFilterString(ISystemFilterString filterString, String newValue) throws Exception - { - if (newValue.equals(filterString.getString())) - return; - ISystemFilter filter = filterString.getParentSystemFilter(); - filter.updateFilterString(filterString, newValue); - ISystemFilterPool parentPool = filter.getParentFilterPool(); - commit(parentPool); - if ((caller != null) && !suspendCallbacks) - caller.filterEventFilterStringUpdated(filterString); - } - /** - * Return the zero-based position of a SystemFilterString object within its filter - */ - public int getSystemFilterStringPosition(ISystemFilterString filterString) - { - ISystemFilter filter = filterString.getParentSystemFilter(); - int position = -1; - boolean match = false; - ISystemFilterString[] filterStrings = filter.getSystemFilterStrings(); - - String matchString = filterString.getString(); - for (int idx = 0; !match && (idx - *

    - * Does the following: - *

      - *
    • After the move, the filter pool containing the filter containing the filter strings is saved to disk. - *
    • Calls back to provider to inform of the event (filterEventFilterStringsRePositioned) - *
    - * @param filterStrings Array of SystemFilterStrings to move. - * @param newPosition new zero-based position for the filter strings - */ - public void moveSystemFilterStrings(ISystemFilterString filterStrings[], int delta) - throws Exception - { - ISystemFilter filter = filterStrings[0].getParentSystemFilter(); - int[] oldPositions = new int[filterStrings.length]; - for (int idx=0; idx 0) // moving down, process backwards - for (int idx=filterStrings.length-1; idx>=0; idx--) - moveFilterString(filter, filterStrings[idx], oldPositions[idx]+delta); - else - for (int idx=0; idx - * - * @generated - */ - public boolean isSingleFilterStringOnly() - { - return singleFilterStringOnly; - } - - /** - * - * - * @generated - */ - public void setSingleFilterStringOnly(boolean newSingleFilterStringOnly) - { - boolean oldSingleFilterStringOnly = singleFilterStringOnly; - if (oldSingleFilterStringOnly != newSingleFilterStringOnly) - { - singleFilterStringOnly = newSingleFilterStringOnly; - setDirty(true); - } - } - - public boolean isDirty() - { - return _isDirty; - } - - public void setDirty(boolean flag) - { - if (_isDirty != flag) - { - _isDirty = flag; - } - } - - public boolean wasRestored() - { - return _wasRestored; - } - - public void setWasRestored(boolean flag) - { - _wasRestored = flag; - } - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterPoolReference.java b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterPoolReference.java index 8546c031288..6a702f501a0 100644 --- a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterPoolReference.java +++ b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterPoolReference.java @@ -18,16 +18,16 @@ package org.eclipse.rse.internal.filters; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.Platform; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterContainer; +import org.eclipse.rse.core.filters.ISystemFilterContainerReference; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolReference; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider; +import org.eclipse.rse.core.filters.ISystemFilterReference; import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterContainer; -import org.eclipse.rse.filters.ISystemFilterContainerReference; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolReference; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; -import org.eclipse.rse.filters.ISystemFilterReference; import org.eclipse.rse.internal.references.SystemPersistableReferencingObject; /** @@ -37,8 +37,8 @@ public class SystemFilterPoolReference extends SystemPersistableReferencingObjec private SystemFilterContainerReferenceCommonMethods containerHelper = null; private ISystemFilterPoolManager filterPoolManager = null; - protected static final String DELIMITER = "___"; - protected static final int DELIMITER_LENGTH = 3; + public static final String DELIMITER = "___"; + public static final int DELIMITER_LENGTH = 3; /** * Default constructor. diff --git a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterPoolReferenceManager.java b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterPoolReferenceManager.java deleted file mode 100644 index d6378ae4d45..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterPoolReferenceManager.java +++ /dev/null @@ -1,1126 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.internal.filters; -import java.util.Vector; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IFolder; -import org.eclipse.rse.core.SystemResourceHelpers; -import org.eclipse.rse.core.filters.IRSEFilterNamingPolicy; -import org.eclipse.rse.core.references.IRSEBasePersistableReferencingObject; -import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterConstants; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.filters.ISystemFilterPoolReference; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; -import org.eclipse.rse.filters.ISystemFilterReference; -import org.eclipse.rse.filters.ISystemFilterSavePolicies; -import org.eclipse.rse.internal.references.SystemPersistableReferenceManager; - - -/** - * This class manages a persistable list of objects each of which reference - * a filter pool. This class builds on the parent class SystemPersistableReferenceManager, - * offering convenience versions of the parent methods that are typed to the - * classes in the filters framework. - */ -/** - * @lastgen class SystemFilterPoolReferenceManagerImpl extends SystemPersistableReferenceManagerImpl implements SystemFilterPoolReferenceManager, SystemPersistableReferenceManager {} - */ -public class SystemFilterPoolReferenceManager extends SystemPersistableReferenceManager implements ISystemFilterPoolReferenceManager -{ - //private SystemFilterPoolManager[] poolMgrs = null; - private ISystemFilterPoolManagerProvider poolMgrProvider = null; - private ISystemFilterPoolManager defaultPoolMgr = null; - private ISystemFilterPoolReferenceManagerProvider caller = null; - private IRSEFilterNamingPolicy namingPolicy = null; - private int savePolicy = ISystemFilterSavePolicies.SAVE_POLICY_NONE; - private Object mgrData = null; - private IFolder mgrFolder = null; - private boolean initialized = false; - private boolean noSave; - private boolean noEvents; - private boolean fireEvents = true; - private ISystemFilterPoolReference[] fpRefsArray = null; - private static final ISystemFilterPoolReference[] emptyFilterPoolRefArray = new ISystemFilterPoolReference[0]; - -/** - * Default constructor. Typically called by MOF factory methods. - */ - public SystemFilterPoolReferenceManager() - { - super(); - } - /** - * Create a SystemFilterPoolReferenceManager instance. - * @param caller Objects which instantiate this class should implement the - * SystemFilterPoolReferenceManagerProvider interface, and pass "this" for this parameter. - * Given any filter framework object, it is possible to retrieve the caller's - * object via the getProvider method call. - * @param relatedPoolManagers The managers that owns the master list of filter pools that - * this manager will contain references to. - * @param mgrFolder the folder that will hold the persisted file. This is used when - * the save policy is SAVE_POLICY_ONE_FILE_PER_MANAGER. For SAVE_POLICY_NONE, this - * is not used. If it is used, it is created if it does not already exist. - * @param name the name of the filter pool reference manager. This is used when - * the save policy is SAVE_POLICY_ONE_FILE_PER_MANAGER, to deduce the file name. - * @param savePolicy The save policy for the filter pool references list. One of the - * following from the {@link org.eclipse.rse.filters.ISystemFilterConstants SystemFilterConstants} - * interface: - *
      - *
    • SAVE_POLICY_NONE - no files, all save/restore handled elsewhere - *
    • SAVE_POLICY_ONE_FILE_PER_MANAGER - one file: mgrName.xmi - *
    - * @param namingPolicy The names to use for file and folders when persisting to disk. Pass - * null to just use the defaults, or if using SAVE_POLICY_NONE. - */ - public static ISystemFilterPoolReferenceManager createSystemFilterPoolReferenceManager( - ISystemFilterPoolReferenceManagerProvider caller, - ISystemFilterPoolManagerProvider relatedPoolManagerProvider, - IFolder mgrFolder, - String name, - int savePolicy, - IRSEFilterNamingPolicy namingPolicy) - { - SystemFilterPoolReferenceManager mgr = null; - - if (mgrFolder != null) - SystemResourceHelpers.getResourceHelpers().ensureFolderExists(mgrFolder); - if (namingPolicy == null) - namingPolicy = SystemFilterNamingPolicy.getNamingPolicy(); - try - { - if (savePolicy != ISystemFilterSavePolicies.SAVE_POLICY_NONE) - mgr = (SystemFilterPoolReferenceManager)restore(caller, mgrFolder, name, namingPolicy); - } - catch (Exception exc) // real error trying to restore, versus simply not found. - { - // todo: something. Log the exception somewhere? - } - if (mgr == null) // not found or some serious error. - { - mgr = createManager(); - } - if (mgr != null) - { - mgr.initialize(caller, mgrFolder, name, savePolicy, namingPolicy, relatedPoolManagerProvider); - } - - return mgr; - } - - /* - * Private helper method. - * Uses MOF to create an instance of this class. - */ - protected static SystemFilterPoolReferenceManager createManager() - { - ISystemFilterPoolReferenceManager mgr = new SystemFilterPoolReferenceManager(); - // FIXME SystemFilterImpl.initMOF().createSystemFilterPoolReferenceManager(); - return (SystemFilterPoolReferenceManager)mgr; - } - - - - /* - * Private helper method to initialize state - */ - protected void initialize(ISystemFilterPoolReferenceManagerProvider caller, - IFolder folder, - String name, - int savePolicy, - IRSEFilterNamingPolicy namingPolicy, - ISystemFilterPoolManagerProvider relatedPoolManagerProvider) - { - if (!initialized) - initialize(caller, folder, name, savePolicy, namingPolicy); // core data - //setSystemFilterPoolManagers(relatedPoolManagers); - setSystemFilterPoolManagerProvider(relatedPoolManagerProvider); - } - - /* - * Private helper method to do core initialization. - * Might be called from either the static factory method or the static restore method. - */ - protected void initialize(ISystemFilterPoolReferenceManagerProvider caller, - IFolder folder, - String name, - int savePolicy, - IRSEFilterNamingPolicy namingPolicy) - { - this.mgrFolder = folder; - setProvider(caller); - setName(name); - this.savePolicy = savePolicy; - setNamingPolicy(namingPolicy); - initialized = true; - } - - private void invalidateFilterPoolReferencesCache() - { - fpRefsArray = null; - invalidateCache(); - } - - // ------------------------------------------------------------ - // Methods for setting and querying attributes - // ------------------------------------------------------------ - /** - * Set the associated master pool manager provider. Note the provider - * typically manages multiple pool managers and we manage references - * across those. - */ - public void setSystemFilterPoolManagerProvider(ISystemFilterPoolManagerProvider poolMgrProvider) - { - this.poolMgrProvider = poolMgrProvider; - } - /** - * Get the associated master pool manager provider. Note the provider - * typically manages multiple pool managers and we manage references - * across those. - */ - public ISystemFilterPoolManagerProvider getSystemFilterPoolManagerProvider() - { - return poolMgrProvider; - } - /* - * Set the managers of the master list of filter pools, from which - * objects in this list reference. - * - public void setSystemFilterPoolManagers(SystemFilterPoolManager[] mgrs) - { - this.poolMgrs = mgrs; - }*/ - - /** - * Get the managers of the master list of filter pools, from which - * objects in this list reference. - */ - public ISystemFilterPoolManager[] getSystemFilterPoolManagers() - { - //return poolMgrs; - return poolMgrProvider.getSystemFilterPoolManagers(); - } - /** - * Get the managers of the master list of filter pools, from which - * objects in this list reference, but which are not in the list of - * managers our pool manager supplier gives us. That is, these are - * references to filter pools outside the expected list. - */ - public ISystemFilterPoolManager[] getAdditionalSystemFilterPoolManagers() - { - ISystemFilterPoolManager[] poolMgrs = getSystemFilterPoolManagers(); - Vector v = new Vector(); - - ISystemFilterPoolReference[] fpRefs = getSystemFilterPoolReferences(); - for (int idx=0; idx 0) - { - additionalMgrs = new ISystemFilterPoolManager[v.size()]; - for (int idx=0; idxCalls back to inform provider - * @param array of filter pool reference objects to set the list to. - * @param deReference true to first de-reference all objects in the existing list. - */ - public void setSystemFilterPoolReferences(ISystemFilterPoolReference[] filterPoolReferences, - boolean deReference) - { - super.setReferencingObjects(filterPoolReferences, deReference); - invalidateFilterPoolReferencesCache(); - // callback to provider so they can fire events in their GUI - if (fireEvents && (caller != null)) - caller.filterEventFilterPoolReferencesReset(); - quietSave(); - } - - /** - * Create a filter pool reference. This creates a raw reference that must be added to the managed - * lists by the caller. - */ - private ISystemFilterPoolReference createSystemFilterPoolReference(ISystemFilterPool filterPool) { - ISystemFilterPoolReference filterPoolReference = new SystemFilterPoolReference(filterPool); - invalidateFilterPoolReferencesCache(); - return filterPoolReference; - } - - /** - * Create a filter pool reference. This creates an unresolved raw reference that - * must be added to the managed lists by the caller. - * That will be attempted to be resolved on first use. - */ - // DWD working - private ISystemFilterPoolReference createSystemFilterPoolReference(ISystemFilterPoolManager filterPoolManager, String filterPoolName) { - ISystemFilterPoolReference filterPoolReference = new SystemFilterPoolReference(filterPoolManager, filterPoolName); - invalidateFilterPoolReferencesCache(); - return filterPoolReference; - } - - /** - * Add a filter pool referencing object to the list. - * @return the new count of referencing objects - */ - public int addSystemFilterPoolReference(ISystemFilterPoolReference filterPoolReference) - { - int count = addReferencingObject(filterPoolReference); - filterPoolReference.setParentReferenceManager(this); // DWD - should be done in the addReferencingObject method - invalidateFilterPoolReferencesCache(); - quietSave(); - return count; - } - - /** - * Reset the filter pool a reference points to. Called on a move-filter-pool operation - */ - public void resetSystemFilterPoolReference(ISystemFilterPoolReference filterPoolReference, ISystemFilterPool newPool) - { - filterPoolReference.removeReference(); - filterPoolReference.setReferencedObject(newPool); - if (fireEvents && (caller != null)) - caller.filterEventFilterPoolReferenceReset(filterPoolReference); - quietSave(); - // don't think we need to invalidate the cache - } - /** - * Remove a filter pool referencing object from the list. - * @param filterPool Reference the reference to remove - * @param deReference true if we want to dereference the referenced object (call removeReference on it) - * @return the new count of referencing objects - */ - public int removeSystemFilterPoolReference(ISystemFilterPoolReference filterPoolReference, - boolean deReference) - { - int count = 0; - if (!deReference) - count = super.removeReferencingObject(filterPoolReference); - else - count = super.removeAndDeReferenceReferencingObject(filterPoolReference); - filterPoolReference.setParentReferenceManager(null); // DWD should be done in remove - invalidateFilterPoolReferencesCache(); - // callback to provider so they can fire events in their GUI - if (fireEvents && (caller != null)) - caller.filterEventFilterPoolReferenceDeleted(filterPoolReference); - quietSave(); - return count; - } - /** - * Return count of referenced filter pools - */ - public int getSystemFilterPoolReferenceCount() - { - return super.getReferencingObjectCount(); - } - - /** - * Return the zero-based position of a SystemFilterPoolReference object within this list - */ - public int getSystemFilterPoolReferencePosition(ISystemFilterPoolReference filterPoolRef) - { - return super.getReferencingObjectPosition(filterPoolRef); - } - - /** - * Move a given filter pool reference to a given zero-based location - * Calls back to inform provider of the event - */ - public void moveSystemFilterPoolReference(ISystemFilterPoolReference filterPoolRef, int pos) - { - int oldPos = super.getReferencingObjectPosition(filterPoolRef); - super.moveReferencingObjectPosition(pos, filterPoolRef); - invalidateFilterPoolReferencesCache(); - // callback to provider so they can fire events in their GUI - if (!noSave) - quietSave(); - if (fireEvents && (caller != null) && !noEvents) - { - ISystemFilterPoolReference[] refs = new ISystemFilterPoolReference[1]; - refs[0] = filterPoolRef; - caller.filterEventFilterPoolReferencesRePositioned(refs, pos-oldPos); - } - } - /** - * Move existing filter pool references a given number of positions. - * If the delta is negative, they are all moved up by the given amount. If - * positive, they are all moved down by the given amount.

    - *

    - * Calls back to inform provider - * @param filterPoolRefs Array of SystemFilterPoolReferences to move. - * @param newPosition new zero-based position for the filter pool references. - */ - public void moveSystemFilterPoolReferences(ISystemFilterPoolReference[] filterPoolRefs, int delta) - { - int[] oldPositions = new int[filterPoolRefs.length]; - noEvents = noSave = true; - for (int idx=0; idx 0) // moving down, process backwards - for (int idx=filterPoolRefs.length-1; idx>=0; idx--) - moveSystemFilterPoolReference(filterPoolRefs[idx], oldPositions[idx]+delta); - else - for (int idx=0; idx Calls back to inform provider - */ - public void renameReferenceToSystemFilterPool(ISystemFilterPool pool) - { - ISystemFilterPoolReference poolRef = null; - IRSEBasePersistableReferencingObject[] refs = getReferencingObjects(); - for (int idx=0; (poolRef==null) && (idx - * This method is called after restore and for each restored object in the list must: - *

      - *
    1. Do what is necessary to find the referenced object, and set the internal reference pointer. - *
    2. Call addReference(this) on that object so it can maintain it's in-memory list - * of all referencing objects. - *
    3. Set the important transient variables - *
    - * @param relatedManagers the filter pool managers that hold filter pools we reference - * @param provider the host of this reference manager, so you can later call getProvider - * @return A Vector of SystemFilterPoolReferences that were not successfully resolved, or null if all - * were resolved. - */ - public Vector resolveReferencesAfterRestore(ISystemFilterPoolManagerProvider relatedPoolMgrProvider, - ISystemFilterPoolReferenceManagerProvider provider) - { - setSystemFilterPoolManagerProvider(relatedPoolMgrProvider); // sets poolMgrs = relatedManagers - setProvider(provider); - ISystemFilterPoolManager[] relatedManagers = getSystemFilterPoolManagers(); - if (relatedManagers != null) - { - Vector badRefs = new Vector(); - ISystemFilterPoolReference[] poolRefs = getSystemFilterPoolReferences(); - if (poolRefs != null) - { - for (int idx=0; idx - * @param mgrs The list of filter pool managers to scan for the given filter pool. - * @param mgrName The name of the manager to restrict the search to - * @param poolReferenceName The name of the filter pool as stored on disk. It may be qualified somehow - * to incorporate the manager name too. - */ - public static ISystemFilterPool getFilterPool(ISystemFilterPoolManager[] mgrs, String mgrName, String poolName) - { - ISystemFilterPoolManager mgr = getFilterPoolManager(mgrs, mgrName); - if (mgr == null) - return null; - return mgr.getSystemFilterPool(poolName); - } - /** - * Utility method to scan across all filter pool managers for a match on a give name. - *

    - * @param mgrs The list of filter pool managers to scan for the given name - * @param mgrName The name of the manager to restrict the search to - */ - public static ISystemFilterPoolManager getFilterPoolManager(ISystemFilterPoolManager[] mgrs, String mgrName) - { - ISystemFilterPoolManager mgr = null; - for (int idx=0; (mgr==null)&&(idx - * Just a shortcut to {@link org.eclipse.rse.model.ISystemRegistry#getSubSystems(IHost)} + * Just a shortcut to {@link org.eclipse.rse.core.model.ISystemRegistry#getSubSystems(IHost)} */ public ISubSystem[] getSubSystems() { diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemHostPool.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemHostPool.java index 5a2511e0a6a..68ed7b4e0a2 100644 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemHostPool.java +++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemHostPool.java @@ -22,10 +22,10 @@ import java.util.List; import org.eclipse.rse.core.ISystemUserIdConstants; import org.eclipse.rse.core.SystemPreferencesManager; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemHostPool; +import org.eclipse.rse.core.model.ISystemProfile; import org.eclipse.rse.core.model.RSEModelObject; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemHostPool; -import org.eclipse.rse.model.ISystemProfile; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemNewConnectionPromptObject.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemNewConnectionPromptObject.java index 78d8e66b9fd..ba6c92cc6e4 100644 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemNewConnectionPromptObject.java +++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemNewConnectionPromptObject.java @@ -20,9 +20,9 @@ import org.eclipse.core.runtime.Platform; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.rse.core.IRSESystemType; import org.eclipse.rse.core.RSECorePlugin; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.model.ISystemMessageObject; import org.eclipse.rse.core.model.SystemMessageObject; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.model.ISystemPromptableObject; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemProfile.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemProfile.java index 9efbc943ccc..817af179121 100644 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemProfile.java +++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemProfile.java @@ -19,13 +19,13 @@ import java.util.Vector; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.Platform; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemProfile; +import org.eclipse.rse.core.model.ISystemProfileManager; import org.eclipse.rse.core.model.RSEModelObject; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemProfile; -import org.eclipse.rse.model.ISystemProfileManager; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemProfileManager.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemProfileManager.java index 06b7ce763fc..1d44a898cc9 100644 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemProfileManager.java +++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemProfileManager.java @@ -22,8 +22,8 @@ import java.util.Vector; import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.SystemPreferencesManager; -import org.eclipse.rse.model.ISystemProfile; -import org.eclipse.rse.model.ISystemProfileManager; +import org.eclipse.rse.core.model.ISystemProfile; +import org.eclipse.rse.core.model.ISystemProfileManager; import org.eclipse.rse.model.SystemStartHere; import org.eclipse.rse.ui.ISystemPreferencesConstants; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/DummyHost.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/DummyHost.java index 3ad74e6125f..9326a5b1e09 100644 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/DummyHost.java +++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/DummyHost.java @@ -15,7 +15,10 @@ ********************************************************************************/ package org.eclipse.rse.model; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.model.IPropertySet; +import org.eclipse.rse.core.model.ISystemHostPool; +import org.eclipse.rse.core.model.ISystemProfile; import org.eclipse.rse.core.subsystems.IConnectorService; import org.eclipse.rse.core.subsystems.ISubSystem; diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/IHost.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/IHost.java deleted file mode 100644 index 26c87df1816..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/IHost.java +++ /dev/null @@ -1,213 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.model; - - - - -import org.eclipse.rse.core.model.IRSEModelObject; -import org.eclipse.rse.core.subsystems.IConnectorService; -import org.eclipse.rse.core.subsystems.ISubSystem; - -/** - * Interface for SystemConnection objects. - * A SystemConnect holds information identifying a remote system. It also logically contains - * SubSystem objects, although this containment is achievable programmatically versus via - * object oriented containment. - *

    - */ -/** - * @lastgen interface SystemConnection {} - */ -public interface IHost extends IRSEModelObject -{ - /** - * Return the system profile that owns this connection - */ - public ISystemProfile getSystemProfile(); - - /** - * Return the name of the system profile that owns this connection - */ - public String getSystemProfileName(); - - /** - * Set the parent connection pool this is owned by. - * Connection pools are internal management objects, one per profile. - */ - public void setHostPool(ISystemHostPool pool); - /** - * Set the parent connection pool this is owned by. - * Connection pools are internal management objects, one per profile. - */ - public ISystemHostPool getHostPool(); - - /** - * Return the subsystem instances under this connection. - * Just a shortcut to {@link org.eclipse.rse.model.ISystemRegistry#getSubSystems(IHost)} - */ - public ISubSystem[] getSubSystems(); - - /** - * Return the local default user Id without resolving up the food chain. - * @see #getDefaultUserId() - */ - public String getLocalDefaultUserId(); - /** - * Clear the local default user Id so next query will return the value from - * the preference store. - *

    - * Same as calling setDefaultUserId(null) - * @see #setDefaultUserId(String) - */ - public void clearLocalDefaultUserId(); - - /** - * Private method called when this connection is being deleted, so - * we can do any pre-death cleanup we need. - *

    - * What we need to do is delete our entry in the preference store for our default userId. - */ - public void deletingHost(); - - /** - * Private method called when this connection's profile is being rename, so - * we can do any pre-death cleanup we need. - *

    - * What we need to do is rename our entry in the preference store for our default userId. - */ - public void renamingSystemProfile(String oldName, String newName); - /** - * Call this to query whether the default userId is to be uppercased. - */ - public boolean getForceUserIdToUpperCase(); - /** - * Call this to compare two userIds taking case sensitivity - */ - public boolean compareUserIds(String userId1, String userId2); -/** - * @return The value of the SystemType attribute - */ - public String getSystemType(); - -/** - * @param value The new value of the SystemType attribute - */ - public void setSystemType(String value); - -/** - * @return The value of the AliasName attribute - * The unique key for this object. Unique per connection pool - */ - public String getAliasName(); - -/** - * @param value The new value of the AliasName attribute - */ - public void setAliasName(String value); - -/** - * @return The value of the HostName attribute - */ - public String getHostName(); - -/** - * @param value The new value of the HostName attribute - */ - public void setHostName(String value); - -/** - * @return The value of the Description attribute - */ - public String getDescription(); - -/** - * @param value The new value of the Description attribute - */ - public void setDescription(String value); - -/** - * We return the default user Id. Note that we don't store it directly in - * the mof-modelled attribute, as we don't want the team to share it. Rather, - * we store the actual user Id in the preference store keyed by this connection's - * unique name (profile.connName) and store that key in this attribute. - *

    - * Further, it is possible that there is no default user id. If so, this - * method will go to the preference store and will try to get the default user - * Id per this connection's system type. - *

    - * This is all transparent to the caller though. - *

    - * @return The value of the DefaultUserId attribute - */ - public String getDefaultUserId(); - -/** - * Intercept of setDefaultUserId so we can force it to uppercase. - * Also, we do not store the user Id per se in the attribute, but rather - * we store it in the preference with a key name unique to this connection. - * We store that key name in this attribute. However, this is all transparent to - * the caller. - * @param value The new value of the DefaultUserId attribute - */ - public void setDefaultUserId(String value); - - /** - * @generated This field/method will be replaced during code generation - * @return The value of the Promptable attribute - */ - boolean isPromptable(); - - /** - * @generated This field/method will be replaced during code generation - * @param value The new value of the Promptable attribute - */ - void setPromptable(boolean value); - - /** - * Returns the value of the 'Offline' attribute. - * - *

    - * Is this connection offline? If so, there is no live connection. Subsystems - * decide how much to enable while offline. - *

    - * - * @return the value of the 'Offline' attribute. - * @see #setOffline(boolean) - * @see org.eclipse.rse.model.ModelPackage#getSystemConnection_Offline() - * @model - * @generated - */ - boolean isOffline(); - - /** - * Sets the value of the '{@link org.eclipse.rse.model.IHost#isOffline Offline}' attribute. - * - * - * @param value the new value of the 'Offline' attribute. - * @see #isOffline() - * @generated - */ - void setOffline(boolean value); - - /** - * Returns all the connector services provided - * for this host - * @return the connector services - */ - IConnectorService[] getConnectorServices(); -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemHostPool.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemHostPool.java deleted file mode 100644 index 3b486e6f896..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemHostPool.java +++ /dev/null @@ -1,179 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.model; - -import java.util.List; - -import org.eclipse.rse.core.persistance.IRSEPersistableContainer; - - -// -/** - * A list of connections. - */ -/** - * @lastgen interface SystemConnectionPool {} - */ - -public interface ISystemHostPool extends IRSEPersistableContainer -{ - - - - /** - * Return the system profile that owns this connection pool - */ - public ISystemProfile getSystemProfile(); - /** - * Rename this connection pool. - */ - public void renameHostPool(String newName); - /** - * Return array of connections in this pool - */ - public IHost[] getHosts(); - /** - * Create a connection. - */ - public IHost createHost(String systemType, String aliasName, String hostName) - throws Exception; - /** - * Create a connection. - */ - public IHost createHost(String systemType, String aliasName, String hostName, String description) - throws Exception; - /** - * Create a connection. - */ - public IHost createHost(String systemType, String aliasName, String hostName, String description, - String defaultUserId, int defaultUserIdLocation) - throws Exception; - /** - * Update an existing connection given the new information. - * This method: - *
      - *
    • calls the setXXX methods on the given connection object, updating the information in it. - *
    • saves the connection to disk (renaming its folder if needed) - *
    - *

    - * @param conn SystemConnection to be updated - * @param systemType system type matching one of the system type names defined via the - * systemType extension point. - * @param aliasName unique connection name. - * @param hostName ip name of host. - * @param description optional description of the connection. Can be null. - * @param defaultUserId userId to use as the default for the subsystems. - * @param defaultUserIdLocation where to set the given default user Id. See ISystemUserIdConstants - */ - public void updateHost(IHost conn, String systemType, - String aliasName, String hostName, - String description,String defaultUserId, int defaultUserIdLocation) - throws Exception; - - /** - * Return a connection given its name. - */ - public IHost getHost(String aliasName); - /** - * Return the connection at the given zero-based offset - */ - public IHost getHost(int pos); - /** - * Add a new connection to the list. - */ - public boolean addHost(IHost conn); - /** - * Removes a given connection from the list and deletes it from disk. - *

    - * This will: - *

      - *
    • Delete the connection in memory - *
    • Delete the underlying folder - *
    - *

    - * @param conn SystemConnection object to remove - */ - public void deleteHost(IHost conn); - /** - * Renames a given connection in the list. - * This will: - *

      - *
    • Rename the profile in memory - *
    • Rename the underlying folder - *
    • Update the user preferences if this profile is currently active. - *
    - * @param conn SystemConnection object to rename - * @param newName The new name to give that connection. - */ - public void renameHost(IHost conn, String newName) throws Exception; - /** - * Return the zero-based position of a SystemConnection object within its profile. - */ - public int getHostPosition(IHost conn); - /** - * Return the number of SystemConnection objects within this pool. - */ - public int getHostCount(); - - /** - * Duplicates a given connection in this list within this list or another list. - * @param targetPool The SystemConnectionPool to hold the copied connection. Can equal this connection, as long as alias name is unique - * @param conn SystemConnection object (within our pool) to clone - * @param aliasName New, unique, alias name to give this connection. Clone will fail if this is not unique. - */ - public IHost cloneHost(ISystemHostPool targetPool, IHost conn, String aliasName) - throws Exception; - - /** - * Move existing connections a given number of positions in the same pool. - * If the delta is negative, they are all moved up by the given amount. If - * positive, they are all moved down by the given amount.

    - *

      - *
    • After the move, the pool containing the moved connection is saved to disk. - *
    • The connection's alias name must be unique in pool. - *
    - * TODO PROBLEM: CAN'T RE-ORDER FOLDERS SO CAN WE SUPPORT THIS ACTION? - * @param conns Array of SystemConnections to move. - * @param newPosition new zero-based position for the connection - */ - public void moveHosts(IHost conns[], int delta); - - /** - * Order connections according to user preferences. - * Called after restore. - */ - public void orderHosts(String[] names); - - /** - * @generated This field/method will be replaced during code generation - * @return The value of the Name attribute - */ - String getName(); - - /** - * @generated This field/method will be replaced during code generation - * @param value The new value of the Name attribute - */ - void setName(String value); - - /** - * @generated This field/method will be replaced during code generation - * @return The list of Connections references - */ - List getHostList(); - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemProfile.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemProfile.java deleted file mode 100644 index 714ff370331..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemProfile.java +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.model; -import org.eclipse.rse.core.model.IRSEModelObject; -import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; -import org.eclipse.rse.filters.ISystemFilterPool; - -// - -/** - * The interface that RSE system profiles implement. - *

    - * A profile represents a user or name which is used to key important user-data - * by: - *

      - *
    • Hosts - *
    • Filter pools - *
    • User actions - *
    • Compile commands - *
    - * - *

    - * @lastgen interface SystemProfile {} - */ -public interface ISystemProfile extends IRSEModelObject -{ - - /** - * Set the in-memory pointer back to the parent system profile manager - */ - public void setProfileManager(ISystemProfileManager mgr); - /** - * Get the in-memory pointer back to the parent system profile manager - */ - public ISystemProfileManager getProfileManager(); - - /** - * Convenience method for create a new connection within this profile. - * Shortcut for {@link ISystemRegistry#createHost(String,String,String,String)} - */ - public IHost createHost(String systemType, String connectionName, String hostName, String description) throws Exception; - - /** - * @return The value of the Name attribute - */ - String getName(); - - /** - * @param value The new value of the Name attribute - */ - void setName(String value); - - /** - * @return The value of the DefaultPrivate attribute - * Is this profile created automatically, and is it the profile - * that is unique for this developer? - */ - boolean isDefaultPrivate(); - - /** - * @generated This field/method will be replaced during code generation - * @param value The new value of the DefaultPrivate attribute - */ - void setDefaultPrivate(boolean value); - - /** - * Return all connections for this profile - */ - public IHost[] getHosts(); - /** - * Return all filter pools for this profile - */ - public ISystemFilterPool[] getFilterPools(); - /** - * Return all filter pools for this profile, scoped by a given subsystem factory - */ - public ISystemFilterPool[] getFilterPools(ISubSystemConfiguration ssf); - /** - * Return true if this profile is currently active for this user - */ - public boolean isActive(); -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemProfileManager.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemProfileManager.java deleted file mode 100644 index 77c3d2cd48f..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemProfileManager.java +++ /dev/null @@ -1,126 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.model; -import java.util.Vector; - -import org.eclipse.rse.ui.validators.ISystemValidator; - - -/** - * A class that manages a list of SystemProfile objects. - */ -/** - * @lastgen interface SystemProfileManager {} - */ - -public interface ISystemProfileManager { - - - /** - * Create a new profile with the given name, and add to the list. - * The name must be unique within the existing list. - *

    - * The underlying folder is created in the file system. - *

    - * @param name What to name this profile - * @param makeActive true if this profile is to be added to the active profile list. - * @return new profile, or null if name not unique. - */ - public ISystemProfile createSystemProfile(String name, boolean makeActive); - /** - * Toggle an existing profile's state between active and inactive - */ - public void makeSystemProfileActive(ISystemProfile profile, boolean makeActive); - /** - * Get an array of all existing profiles. - */ - public ISystemProfile[] getSystemProfiles(); - /** - * Get an array of all existing profile names. - */ - public String[] getSystemProfileNames(); - /** - * Get a vector of all existing profile names. - */ - public Vector getSystemProfileNamesVector(); - /** - * Get a profile given its name. - */ - public ISystemProfile getSystemProfile(String name); - /** - * Return the profiles identified via preferences as the active profiles... - */ - public ISystemProfile[] getActiveSystemProfiles(); - /** - * Return the profile names currently selected by the user as his "active" profiles - */ - public String[] getActiveSystemProfileNames(); - /** - * Return 0-based position of the given active profile within the list of active profiles. - */ - public int getActiveSystemProfilePosition(String profileName); - /** - * Return the default private profile created at first touch. - * Will return null if it has been renamed! - */ - public ISystemProfile getDefaultPrivateSystemProfile(); - /** - * Return the default team profile created at first touch. - * Will return null if it has been renamed! - */ - public ISystemProfile getDefaultTeamSystemProfile(); - /** - * Rename the given profile. - */ - public void renameSystemProfile(ISystemProfile profile, String newName); - /** - * Delete the given profile - */ - public void deleteSystemProfile(ISystemProfile profile); - /** - * Clone the given profile - */ - public ISystemProfile cloneSystemProfile(ISystemProfile profile, String newName); - /** - * Return true if the given profile is active - * @see ISystemProfile#isActive() - */ - public boolean isSystemProfileActive(String profileName); - - /** - * Reusable method to return a name validator for renaming a profile. - * @param profileName the current profile name on updates. Can be null for new profiles. Used - * to remove from the existing name list the current connection. - */ - public ISystemValidator getProfileNameValidator(String profileName); - /** - * Reusable method to return a name validator for renaming a profile. - * @param profile the current profile object on updates. Can be null for new profiles. Used - * to remove from the existing name list the current connection. - */ - public ISystemValidator getProfileNameValidator(ISystemProfile profile); - - - - - /** - * @generated This field/method will be replaced during code generation - * @return The list of Profiles references - */ - java.util.List getProfiles(); - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRegistry.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRegistry.java deleted file mode 100644 index 36a1a61326e..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRegistry.java +++ /dev/null @@ -1,849 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.model; - -import java.util.List; -import java.util.Vector; - -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.jobs.ISchedulingRule; -import org.eclipse.jface.operation.IRunnableContext; -import org.eclipse.jface.viewers.Viewer; -import org.eclipse.rse.core.model.ISubSystemConfigurationCategories; -import org.eclipse.rse.core.model.ISystemModelChangeEvent; -import org.eclipse.rse.core.model.ISystemModelChangeListener; -import org.eclipse.rse.core.model.ISystemPreferenceChangeEvent; -import org.eclipse.rse.core.model.ISystemPreferenceChangeListener; -import org.eclipse.rse.core.subsystems.IConnectorService; -import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; -import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy; -import org.eclipse.rse.internal.model.SystemScratchpad; -import org.eclipse.rse.ui.view.ISystemViewInputProvider; -import org.eclipse.rse.ui.wizards.ISystemNewConnectionWizardPage; -import org.eclipse.swt.dnd.Clipboard; -import org.eclipse.swt.widgets.Shell; - - -/** - * Registry or front door for all remote system connections. - * There is a singleton of the class implementation of this interface. - * To get it, call the {@link org.eclipse.rse.ui.RSEUIPlugin#getTheSystemRegistry() getTheSystemRegistry} - * method in the RSEUIPlugin object. - *

    - * The idea here is that connections are grouped by system profile. At any - * time, there is a user-specified number of profiles "active" and connections - * from each active profile are worked with. - */ -public interface ISystemRegistry extends ISystemViewInputProvider, ISchedulingRule -{ - // ---------------------------------- - // UI METHODS... - // ---------------------------------- - /** - * Show the RSE perspective if it is not already showing - */ - public void showRSEPerspective(); - /** - * Expand the given connection in the RSE, if the RSE is the active perspective. - */ - public void expandHost(IHost conn); - /** - * Expand the given subsystem in the RSE, if the RSE is the active perspective. - */ - public void expandSubSystem(ISubSystem subsystem); - // ---------------------------------- - // ACTIVE PROGRESS MONITOR METHODS... - // ---------------------------------- - /** - * Set the current active runnable context to be used for a progress monitor - * by the subsystem methods that go to the host. Called by wizards and dialogs - * that have a built-in progress monitor and hence removes the need to popup - * an intrusive pm dialog. - *

    You must call clearRunnableContext when your dialog/wizard is disposed! - * @param shell The shell of the wizard/dialog. This is recorded so it can be tested if - * it is disposed before attempting to use the context - * @param context The dialog/wizard/view that implements IRunnableContext - */ - public void setRunnableContext(Shell shell, IRunnableContext context); - /** - * Clear the current active runnable context to be used for a progress monitor. - * Be sure to call this from you dispose method. - */ - public void clearRunnableContext(); - /** - * Return the current registered runnable context, or null if none registered. Use this - * for long running operations instead of an intrusive progress monitor dialog as it is - * more user friendly. Many dialogs/wizards have these built in so it behooves us to use it. - */ - public IRunnableContext getRunnableContext(); - // ---------------------------- - // SUBSYSTEM FACTORY METHODS... - // ---------------------------- - /** - * Private method used by RSEUIPlugin to tell registry all registered subsystem - * factories. This way, all code can use this registry to access them versus the - * RSEUIPlugin. - */ - public void setSubSystemConfigurationProxies(ISubSystemConfigurationProxy[] proxies); - /** - * Public method to retrieve list of subsystem factory proxies registered by extension points. - */ - public ISubSystemConfigurationProxy[] getSubSystemConfigurationProxies(); - /** - * Return all subsystem factory proxies matching a subsystem factory category. - * @see ISubSystemConfigurationCategories - */ - public ISubSystemConfigurationProxy[] getSubSystemConfigurationProxiesByCategory(String factoryCategory); - /** - * Return all subsystem factories. Be careful when you call this, as it activates all - * subsystem factories. - */ - public ISubSystemConfiguration[] getSubSystemConfigurations(); - - /** - * Return the parent subsystemconfiguration given a subsystem object. - */ - public ISubSystemConfiguration getSubSystemConfiguration(ISubSystem subsystem); - /** - * Return the subsystemconfiguration, given its plugin.xml-declared id. - */ - public ISubSystemConfiguration getSubSystemConfiguration(String id); - /** - * Return all subsystem factories which have declared themselves part of the given category. - *

    - * This looks for a match on the "category" of the subsystem factory's xml declaration - * in its plugin.xml file. Thus, it is effecient as it need not bring to life a - * subsystem factory just to test its parent class type. - * - * @see ISubSystemConfigurationCategories - */ - public ISubSystemConfiguration[] getSubSystemConfigurationsByCategory(String factoryCategory); - /** - * Return all subsystem factories which support the given system type. If the type is null, - * returns all. - * - */ - public ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType(String systemType); - - /** - * Return all subsystem factories which support the given system type. If the type is null, - * returns all. - */ - public ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType(String systemType, boolean filterDuplicateServiceSubSystemFactories); - - - // ---------------------------- - // USER PREFERENCE METHODS... - // ---------------------------- - /** - * Are connection names to be qualified by profile name? - */ - public boolean getQualifiedHostNames(); - /** - * Set if connection names are to be qualified by profile name - */ - public void setQualifiedHostNames(boolean set); - /** - * Reflect the user changing the preference for showing filter pools. - */ - public void setShowFilterPools(boolean show); - /* - * Reflect the user changing the preference for showing filter strings. - * - public void setShowFilterStrings(boolean show); - */ - /** - * Reflect the user changing the preference for showing new connection prompt - */ - public void setShowNewHostPrompt(boolean show); - - // ---------------------------- - // PROFILE METHODS... - // ---------------------------- - /** - * Return singleton profile manager - */ - public ISystemProfileManager getSystemProfileManager(); - /** - * Return the profiles currently selected by the user as his "active" profiles - */ - public ISystemProfile[] getActiveSystemProfiles(); - /** - * Return the profile names currently selected by the user as his "active" profiles - */ - public String[] getActiveSystemProfileNames(); - /** - * Return all defined profiles - */ - public ISystemProfile[] getAllSystemProfiles(); - /** - * Return all defined profile names - */ - public String[] getAllSystemProfileNames(); - /** - * Return all defined profile names as a vector - */ - public Vector getAllSystemProfileNamesVector(); - /** - * Get a SystemProfile given its name - */ - public ISystemProfile getSystemProfile(String profileName); - /** - * Create a SystemProfile given its name and whether or not to make it active - */ - public ISystemProfile createSystemProfile(String profileName, boolean makeActive) - throws Exception; - /** - * Copy a SystemProfile. All connections connection data is copied. - * @param monitor Progress monitor to reflect each step of the operation - * @param profile Source profile to copy - * @param newName Unique name to give copied profile - * @param makeActive whether to make the copied profile active or not - * @return new SystemProfile object - */ - public ISystemProfile copySystemProfile(IProgressMonitor monitor, ISystemProfile profile, String newName, boolean makeActive) - throws Exception; - /** - * Rename a SystemProfile. Rename is propogated to all subsystem factories so - * they can rename their filter pool managers and whatever else is required. - */ - public void renameSystemProfile(ISystemProfile profile, String newName) - throws Exception; - /** - * Delete a SystemProfile. Prior to physically deleting the profile, we delete all - * the connections it has, all the subsystems they have. - *

    - * As well, all the filter pools for this profile are deleted, and subsequently any - * cross references from subsystems in connections in other profiles are removed. - *

    - * A delete event is fired for every connection deleted. - */ - public void deleteSystemProfile(ISystemProfile profile) - throws Exception; - /** - * Make or unmake the given profile active - */ - public void setSystemProfileActive(ISystemProfile profile, boolean makeActive); - - - /** - * Return the list of connector services provided for the given host - * @param conn the host - * @return the list of connector services - */ - public IConnectorService[] getConnectorServices(IHost conn); - - // ---------------------------- - // SUBSYSTEM METHODS... - // ---------------------------- - - /** - * Return list of subsystem objects for a given connection. If the subsystems have - * not all been read into memory, this loads them up - */ - public ISubSystem[] getSubSystems(IHost conn); - - /** - * Return list of subsystem objects for a given connection. Use the force - * flag to indicate whether or not to restore from disk - */ - public ISubSystem[] getSubSystems(IHost conn, boolean force); - - public ISubSystem[] getServiceSubSystems(Class serviceType, IHost connection); - - /** - * Resolve a subsystem from it's profile, connection and subsystem name. - * - * @param srcProfileName the name of the profile - * @param srcConnectionName the name of the connection - * @param subsystemFactoryId the id of the subsystem - * - * @return the subsystem - */ - public ISubSystem getSubSystem(String srcProfileName, String srcConnectionName, String subsystemFactoryId); - - /** - * Resolve a subsystem from it's absolute name - * - * @param absoluteSubSystemName the name of the subsystem - * - * @return the subsystem - */ - public ISubSystem getSubSystem(String absoluteSubSystemName); - - /** - * Return the absolute name for the specified subsystem - * @param subsystem the subsystem - * @return the absolute name of the subsystem - */ - public String getAbsoluteNameForSubSystem(ISubSystem subsystem); - - /** - * Return the absolute name for the specified connection - * @param connection the connection - * @return the absolute name of the connection - */ - public String getAbsoluteNameForConnection(IHost connection); - - /** - * Get a list of subsystem objects owned by the subsystem factory identified by - * its given plugin.xml-described id. Array is never null, but may be of length 0. - *

    - * This is a list that of all subsystems for all connections owned by the factory. - */ - public ISubSystem[] getSubSystems(String factoryId); - /** - * Get a list of subsystem objects for given connection, owned by the subsystem factory - * identified by its given plugin.xml-described id. Array will never be null but may be length zero. - */ - public ISubSystem[] getSubSystems(String factoryId, IHost connection); - /** - * Get a list of subsystem objects for given connection, owned by a subsystem factory - * that is of the given category. Array will never be null but may be length zero. - *

    - * This looks for a match on the "category" of the subsystem factory's xml declaration - * in its plugin.xml file. - * - * @see org.eclipse.rse.core.model.ISubSystemConfigurationCategories - */ - public ISubSystem[] getSubSystemsBySubSystemConfigurationCategory(String factoryCategory, IHost connection); - - /** - * Delete a subsystem object. This code finds the factory that owns it and - * delegates the request to that factory. - */ - public boolean deleteSubSystem(ISubSystem subsystem); - - // ---------------------------- - // CONNECTION METHODS... - // ---------------------------- - /** - * Return the first connection to localhost we can find. While we always create a default one in - * the user's profile, it is possible that this profile is not active or the connection was deleted. - * However, since any connection to localHost will usually do, we just search all active profiles - * until we find one, and return it.
    - * If no localhost connection is found, this will return null. If one is needed, it can be created - * easily by calling {@link #createLocalHost(ISystemProfile, String, String)}. - */ - public IHost getLocalHost(); - - /** - * Return all connections in all active profiles. - */ - public IHost[] getHosts(); - /** - * Return all connections in a given profile name. - */ - public IHost[] getHostsByProfile(ISystemProfile profile); - /** - * Return all connections in a given profile. - */ - public IHost[] getHostsByProfile(String profileName); - /** - * Return all connections for which there exists one or more subsystems owned - * by a given subsystem factory. - * @see #getSubSystemConfiguration(String) - */ - public IHost[] getHostsBySubSystemConfiguration(ISubSystemConfiguration factory); - /** - * Return all connections for which there exists one or more subsystems owned - * by a given subsystem factory, identified by factory Id - */ - public IHost[] getHostsBySubSystemConfigurationId(String factoryId); - /** - * Return all connections for which there exists one or more subsystems owned - * by any a given subsystem factory that is of the given category. - *

    - * This looks for a match on the "category" of the subsystem factory's xml declaration - * in its plugin.xml file. Thus, it is effecient as it need not bring to life a - * subsystem factory just to test its parent class type. - * - * @see org.eclipse.rse.core.model.ISubSystemConfigurationCategories - */ - public IHost[] getHostsBySubSystemConfigurationCategory(String factoryCategory); - /** - * Return all connections for all active profiles, for the given system type. - */ - public IHost[] getHostsBySystemType(String systemType); - /** - * Return all connections for all active profiles, for the given system types. - */ - public IHost[] getHostsBySystemTypes(String[] systemTypes); - /** - * Return a SystemConnection object given a system profile containing it, - * and a connection name uniquely identifying it. - */ - public IHost getHost(ISystemProfile profile, String connectionName); - /** - * Return the zero-based position of a SystemConnection object within its profile. - */ - public int getHostPosition(IHost conn); - /** - * Return the number of SystemConnection objects within the given profile - */ - public int getHostCount(String profileName); - /** - * Return the number of SystemConnection objects within the given connection's owning profile - */ - public int getHostCountWithinProfile(IHost conn); - /** - * Return the number of SystemConnection objects within all active profiles - */ - public int getHostCount(); - /** - * Return a vector of previously-used connection names in the given named profile. - * @return Vector of String objects. - */ - public Vector getHostAliasNames(String profileName); - /** - * Return a vector of previously-used connection names in the given profile. - * @return Vector of String objects. - */ - public Vector getHostAliasNames(ISystemProfile profile); - /** - * Return a vector of previously-used connection names in all active profiles. - */ - public Vector getHostAliasNamesForAllActiveProfiles(); - - /** - * Return array of all previously specified hostnames. - */ - public String[] getHostNames(); - /** - * Return array of previously specified hostnames for a given system type. - */ - public String[] getHostNames(String systemType); - - /** - * Returns the clipboard used for copy actions - */ - public Clipboard getSystemClipboard(); - - /** - * Returns the list of objects on the system clipboard - * @param srcType the transfer type - * @return the list of clipboard objects - */ - public List getSystemClipboardObjects(int srcType); - - /* - * Returns the remote systems scratchpad root - */ - public SystemScratchpad getSystemScratchPad(); - - /** - * Convenience method to create a local connection, as it often that one is needed - * for access to the local file system. - * @param profile - the profile to create this connection in. If null is passed, we first - * try to find the default private profile and use it, else we take the first active profile. - * @param name - the name to give this profile. Must be unique and non-null. - * @param userId - the user ID to use as the default for the subsystems. Can be null. - */ - public IHost createLocalHost(ISystemProfile profile, String name, String userId); - - /** - * Create a connection object, given the connection pool and given all the possible attributes. - *

    - * THE RESULTING CONNECTION OBJECT IS ADDED TO THE LIST OF EXISTING CONNECTIONS FOR YOU, IN - * THE POOL YOU SPECIFY. THE POOL IS ALSO SAVED TO DISK. - *

    - * This method: - *

      - *
    • creates and saves a new connection within the given profile - *
    • calls all subsystem factories to give them a chance to create a subsystem instance - *
    • fires an ISystemResourceChangeEvent event of type EVENT_ADD to all registered listeners - *
    - *

    - * @param profileName Name of the system profile the connection is to be added to. - * @param systemType system type matching one of the system type names defined via the - * systemTypes extension point. - * @param connectionName unique connection name. - * @param hostName ip name of host. - * @param description optional description of the connection. Can be null. - * @param defaultUserId userId to use as the default for the subsystems. - * @param defaultUserIdLocation one of the constants in {@link org.eclipse.rse.core.ISystemUserIdConstants ISystemUserIdConstants} - * that tells us where to set the user Id - * @param newConnectionWizardPages when called from the New Connection wizard this is union of the list of additional - * wizard pages supplied by the subsystem factories that pertain to the specified system type. Else null. - * @return SystemConnection object, or null if it failed to create. This is typically - * because the connectionName is not unique. Call getLastException() if necessary. - */ - public IHost createHost(String profileName, String systemType, - String connectionName, String hostName, - String description,String defaultUserId, int defaultUserIdLocation, - ISystemNewConnectionWizardPage[] newConnectionWizardPages) - throws Exception; - /** - * Create a connection object. This is a simplified version - *

    - * THE RESULTING CONNECTION OBJECT IS ADDED TO THE LIST OF EXISTING CONNECTIONS FOR YOU, IN - * THE PROFILE YOU SPECIFY. THE PROFILE IS ALSO SAVED TO DISK. - *

    - * This method: - *

      - *
    • creates and saves a new connection within the given profile - *
    • calls all subsystem factories to give them a chance to create a subsystem instance - *
    • fires an ISystemResourceChangeEvent event of type EVENT_ADD to all registered listeners - *
    - *

    - * @param profileName Name of the system profile the connection is to be added to. - * @param systemType system type matching one of the system type names defined via the - * systemTypes extension point. - * @param connectionName unique connection name. - * @param hostName ip name of host. - * @param description optional description of the connection. Can be null. - * @return SystemConnection object, or null if it failed to create. This is typically - * because the connectionName is not unique. Call getLastException() if necessary. - */ - public IHost createHost(String profileName, String systemType, String connectionName, String hostName, String description) - throws Exception; - - /** - * Create a connection object. This is a very simplified version that defaults to the user's - * private profile, or the first active profile if there is no private profile. - *

    - * THE RESULTING CONNECTION OBJECT IS ADDED TO THE LIST OF EXISTING CONNECTIONS FOR YOU, IN - * THE DEFAULT PRIVATE PROFILE, WHICH IS SAVED TO DISK. - *

    - * This method: - *

      - *
    • creates and saves a new connection within the given profile - *
    • calls all subsystem factories to give them a chance to create a subsystem instance - *
    • fires an ISystemResourceChangeEvent event of type EVENT_ADD to all registered listeners - *
    - *

    - * @param systemType system type matching one of the system type names defined via the - * systemTypes extension point. - * @param connectionName unique connection name. - * @param hostName ip name of host. - * @param description optional description of the connection. Can be null. - * @return SystemConnection object, or null if it failed to create. This is typically - * because the connectionName is not unique. Call getLastException() if necessary. - */ - public IHost createHost(String systemType, String connectionName, String hostName, String description) - throws Exception; - - /** - * Update an existing connection given the new information. - * This method: - *

      - *
    • calls the setXXX methods on the given connection object, updating the information in it. - *
    • save the connection's connection pool to disk - *
    • fires an ISystemResourceChangeEvent event of type EVENT_CHANGE to all registered listeners - *
    • if the systemtype or hostname is changed, calls disconnect on each associated subsystem. - * We must do this because a hostname changes fundamentally affects the connection, - * rendering any information currently displayed under - * that connection obsolete. That is, the user will have to reconnect. - *
    - *

    - * @param conn SystemConnection to be updated - * @param systemType system type matching one of the system type names defined via the - * systemTypes extension point. - * @param connectionName unique connection name. - * @param hostName ip name of host. - * @param description optional description of the connection. Can be null. - * @param defaultUserIdLocation one of the constants in {@link org.eclipse.rse.core.ISystemUserIdConstants ISystemUserIdConstants} - * that tells us where to set the user Id - * @param defaultUserId userId to use as the default for the subsystems. - */ - public void updateHost(Shell shell, IHost conn, String systemType, - String connectionName, String hostName, - String description,String defaultUserId, int defaultUserIdLocation); - - /** - * Update the workoffline mode for a connection. - * - * @param conn SystemConnection to change - * @param offline true if connection should be set offline, false if it should be set online - */ - public void setHostOffline(IHost conn, boolean offline); - - /** - * Delete an existing connection. - *

    - * Lots to do here: - *

      - *
    • Delete all subsystem objects for this connection, including their file's on disk. - *
    • Delete the connection from memory. - *
    • Delete the connection's folder from disk. - *
    - * Assumption: firing the delete event is done elsewhere. Specifically, the doDelete method of SystemView. - */ - public void deleteHost(IHost conn); - /** - * Renames an existing connection. - *

    - * Lots to do here: - *

      - *
    • Reset the conn name for all subsystem objects for this connection - *
    • Rename the connection in memory. - *
    • Rename the connection's folder on disk. - *
    - * Assumption: firing the rename event is done elsewhere. Specifically, the doRename method of SystemView. - */ - public void renameHost(IHost conn, String newName) throws Exception; - /** - * Move existing connections a given number of positions in the same profile. - * If the delta is negative, they are all moved up by the given amount. If - * positive, they are all moved down by the given amount.

    - *

      - *
    • After the move, the pool containing the moved connection is saved to disk. - *
    • The connection's name must be unique in pool. - *
    • Fires a single ISystemResourceChangeEvent event of type EVENT_MOVE, if the pool is the private pool. - *
    - * TODO PROBLEM: CAN'T RE-ORDER FOLDERS SO CAN WE SUPPORT THIS ACTION? - * @param conns Array of SystemConnections to move. - * @param newPosition new zero-based position for the connection - */ - public void moveHosts(String profileName, IHost conns[], int delta); - /** - * Copy a SystemConnection. All subsystems are copied, and all connection data is copied. - * @param monitor Progress monitor to reflect each step of the operation - * @param conn The connection to copy - * @param targetProfile What profile to copy into - * @param newName Unique name to give copied profile - * @return new SystemConnection object - */ - public IHost copyHost(IProgressMonitor monitor, IHost conn, - ISystemProfile targetProfile, String newName) - throws Exception; - /** - * Move a SystemConnection to another profile. All subsystems are copied, and all connection data is copied. - * @param monitor Progress monitor to reflect each step of the operation - * @param conn The connection to move - * @param targetProfile What profile to move to - * @param newName Unique name to give moved profile - * @return new SystemConnection object - */ - public IHost moveHost(IProgressMonitor monitor, IHost conn, - ISystemProfile targetProfile, String newName) - throws Exception; - - /** - * Return true if any of the subsystems for the given connection are currently connected - */ - public boolean isAnySubSystemConnected(IHost conn); - - /** - * Return true if all of the subsystems for the given connection are currently connected - */ - public boolean areAllSubSystemsConnected(IHost conn); - - /** - * Disconnect all subsystems for the given connection, if they are currently connected. - */ - public void disconnectAllSubSystems(IHost conn); - - /** - * Inform the world when the connection status changes for a subsystem within a connection - */ - public void connectedStatusChange(ISubSystem subsystem, boolean connected, boolean wasConnected); - - /** - * Inform the world when the connection status changes for a subsystem within a connection - */ - public void connectedStatusChange(ISubSystem subsystem, boolean connected, boolean wasConnected, boolean collapseTree); - - // ---------------------------- - // EVENT METHODS... - // ---------------------------- - - /** - * Register your interest in being told when a system resource such as a connection is changed. - */ - public void addSystemResourceChangeListener(ISystemResourceChangeListener l); - /** - * De-Register your interest in being told when a system resource such as a connection is changed. - */ - public void removeSystemResourceChangeListener(ISystemResourceChangeListener l); - /** - * Query if the ISystemResourceChangeListener is already listening for SystemResourceChange events - */ - public boolean isRegisteredSystemResourceChangeListener(ISystemResourceChangeListener l); - /** - * Notify all listeners of a change to a system resource such as a connection. - * You would not normally call this as the methods in this class call it when appropriate. - */ - public void fireEvent(ISystemResourceChangeEvent event); - /** - * Notify a specific listener of a change to a system resource such as a connection. - */ - public void fireEvent(ISystemResourceChangeListener l, ISystemResourceChangeEvent event); - /** - * Notify all listeners of a change to a system resource such as a connection. - * You would not normally call this as the methods in this class call it when appropriate. - *

    - * This version calls fireEvent at the next reasonable opportunity, leveraging SWT's - * Display.asyncExec() method. - */ - public void postEvent(ISystemResourceChangeEvent event); - /** - * Notify a specific listener of a change to a system resource such as a connection. - *

    - * This version calls fireEvent at the next reasonable opportunity, leveraging SWT's - * Display.asyncExec() method. - */ - public void postEvent(ISystemResourceChangeListener l, ISystemResourceChangeEvent event); - - // ---------------------------- - // PREFERENCE EVENT METHODS... - // ---------------------------- - - /** - * Register your interest in being told when a system preference changes - */ - public void addSystemPreferenceChangeListener(ISystemPreferenceChangeListener l); - /** - * De-Register your interest in being told when a system preference changes - */ - public void removeSystemPreferenceChangeListener(ISystemPreferenceChangeListener l); - /** - * Notify all listeners of a change to a system preference - * You would not normally call this as the methods in this class call it when appropriate. - */ - public void fireEvent(ISystemPreferenceChangeEvent event); - /** - * Notify a specific listener of a change to a system preference - */ - public void fireEvent(ISystemPreferenceChangeListener l, ISystemPreferenceChangeEvent event); - - // ---------------------------- - // MODEL RESOURCE EVENT METHODS... - // ---------------------------- - - /** - * Register your interest in being told when an RSE model resource is changed. - * These are model events, not GUI-optimized events. - */ - public void addSystemModelChangeListener(ISystemModelChangeListener l); - - /** - * De-Register your interest in being told when an RSE model resource is changed. - */ - public void removeSystemModelChangeListener(ISystemModelChangeListener l); - - /** - * Notify all listeners of a change to a system model resource such as a connection. - * You would not normally call this as the methods in this class call it when appropriate. - */ - public void fireEvent(ISystemModelChangeEvent event); - /** - * Notify all listeners of a change to a system model resource such as a connection. - * This one takes the information needed and creates the event for you. - */ - public void fireModelChangeEvent(int eventType, int resourceType, Object resource, String oldName); - - /** - * Notify a specific listener of a change to a system model resource such as a connection. - */ - public void fireEvent(ISystemModelChangeListener l, ISystemModelChangeEvent event); - - // -------------------------------- - // REMOTE RESOURCE EVENT METHODS... - // -------------------------------- - - /** - * Register your interest in being told when a remote resource is changed. - * These are model events, not GUI-optimized events. - */ - public void addSystemRemoteChangeListener(ISystemRemoteChangeListener l); - - /** - * De-Register your interest in being told when a remote resource is changed. - */ - public void removeSystemRemoteChangeListener(ISystemRemoteChangeListener l); - - /** - * Notify all listeners of a change to a remote resource such as a file. - * You would not normally call this as the methods in this class call it when appropriate. - */ - public void fireEvent(ISystemRemoteChangeEvent event); - - /** - * Notify all listeners of a change to a remote resource such as a file. - * This one takes the information needed and creates the event for you. - * @param eventType - one of the constants from {@link org.eclipse.rse.model.ISystemRemoteChangeEvents} - * @param resource - the remote resource object, or absolute name of the resource as would be given by calling getAbsoluteName on its remote adapter - * @param resourceParent - the remote resource's parent object, or absolute name, if that is known. If it is non-null, this will aid in refreshing occurences of that parent. - * @param subsystem - the subsystem which contains this remote resource. This allows the search for impacts to be - * limited to subsystems of the same parent factory, and to connections with the same hostname as the subsystem's connection. - * @param oldName - on a rename operation, this is the absolute name of the resource prior to the rename - * @param originatingViewer - optional. If set, this gives the viewer a clue that it should select the affected resource after refreshing its parent. - * This saves sending a separate event to reveal and select the new created resource on a create event, for example. - */ - public void fireRemoteResourceChangeEvent(int eventType, Object resource, Object resourceParent, ISubSystem subsystem, String oldName, Viewer originatingViewer); - - /** - * Notify a specific listener of a change to a remote resource such as a file. - */ - public void fireEvent(ISystemRemoteChangeListener l, ISystemRemoteChangeEvent event); - - // ---------------------------- - // MISCELLANEOUS METHODS... - // ---------------------------- - - /** - * Returns filter references associated with this resource under the subsystem - */ - public List findFilterReferencesFor(Object resource, ISubSystem subsystem); - - /** - * Marks all filters for this subsystem as stale to prevent caching - * @param subsystem - */ - public void invalidateFiltersFor(ISubSystem subsystem); - - /** - * Marks all filters for this subsystem the contain resourceParent as stale to prevent caching - * @param resourceParent - * @param subsystem - */ - public void invalidateFiltersFor(Object resourceParent, ISubSystem subsystem); - - - - /** - * Return last exception object caught in any method, or null if no exception. - * This has the side effect of clearing the last exception. - */ - public Exception getLastException(); - - // ---------------------------- - // SAVE / RESTORE METHODS... - // ---------------------------- - - /** - * Save everything! - */ - public boolean save(); - /** - * Save specific connection pool - * @return true if saved ok, false if error encountered. If false, call getLastException(). - */ - public boolean saveHostPool(ISystemHostPool pool); - /** - * Save specific connection - * @return true if saved ok, false if error encountered. If false, call getLastException(). - */ - public boolean saveHost(IHost conn); - /** - * Restore all connections within active profiles - * @return true if restored ok, false if error encountered. If false, call getLastException(). - */ - public boolean restore(); -} //SystemRegistry \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemResourceChangeEvents.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemResourceChangeEvents.java index 9f44245b2e6..9a6d7cbb983 100644 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemResourceChangeEvents.java +++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemResourceChangeEvents.java @@ -15,6 +15,9 @@ ********************************************************************************/ package org.eclipse.rse.model; + + + /** * Interface of event ID constants */ diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IServerLauncherProperties.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemFilterStringContentsType.java similarity index 50% rename from rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IServerLauncherProperties.java rename to rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemFilterStringContentsType.java index d6dd7c913b9..1a90c9660c4 100644 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IServerLauncherProperties.java +++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemFilterStringContentsType.java @@ -14,38 +14,37 @@ * {Name} (company) - description of contribution. ********************************************************************************/ -package org.eclipse.rse.core.subsystems; -import org.eclipse.rse.core.model.IRSEModelObject; - +package org.eclipse.rse.model; +import org.eclipse.rse.core.model.ISystemContentsType; /** - * Implement this interface to provide peristable properties for server launching - * All properties to be persisted to be are stored and restored from associated - * IPropertySets - * + * Represents contents that are children of a container */ -public interface IServerLauncherProperties extends IRSEModelObject +public class SystemFilterStringContentsType implements ISystemContentsType { + public static String CONTENTS_TYPE_CHILDREN_PARENTS = "contents_children_parents"; + public static SystemFilterStringContentsType _instance = new SystemFilterStringContentsType(); + + public static SystemFilterStringContentsType getInstance() + { + return _instance; + } + + /* (non-Javadoc) + * @see org.eclipse.rse.model.IRemoteContentsType#getType() + */ + public String getType() + { + return CONTENTS_TYPE_CHILDREN_PARENTS; + } - public IServerLauncherProperties cloneServerLauncher(IServerLauncherProperties newOne); + /* (non-Javadoc) + * @see org.eclipse.rse.model.IRemoteContentsType#isPersistent() + */ + public boolean isPersistent() + { + return false; + } - /** - * Returns the connector service - * @return - */ - public IConnectorService getConnectorService(); - - /** - * Update cached values based on IPropertySets - * - */ - public void restoreFromProperties(); - - /** - * Store cached values based on IPropertySets - * - */ - public void saveToProperties(); - -} // ServerLauncher \ No newline at end of file +} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemRegistry.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRegistry.java similarity index 97% rename from rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemRegistry.java rename to rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRegistry.java index b1409c51766..d2ac6bf8ea7 100644 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/internal/model/SystemRegistry.java +++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRegistry.java @@ -14,7 +14,7 @@ * {Name} (company) - description of contribution. ********************************************************************************/ -package org.eclipse.rse.internal.model; +package org.eclipse.rse.model; import java.io.File; import java.util.ArrayList; import java.util.List; @@ -34,37 +34,44 @@ import org.eclipse.rse.core.SystemAdapterHelpers; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.SystemPerspectiveHelpers; import org.eclipse.rse.core.SystemPreferencesManager; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager; +import org.eclipse.rse.core.filters.ISystemFilterReference; +import org.eclipse.rse.core.filters.ISystemFilterStartHere; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.model.ISubSystemConfigurationCategories; import org.eclipse.rse.core.model.ISystemContainer; +import org.eclipse.rse.core.model.ISystemHostPool; import org.eclipse.rse.core.model.ISystemModelChangeEvent; import org.eclipse.rse.core.model.ISystemModelChangeEvents; import org.eclipse.rse.core.model.ISystemModelChangeListener; +import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage; import org.eclipse.rse.core.model.ISystemPreferenceChangeEvent; import org.eclipse.rse.core.model.ISystemPreferenceChangeListener; +import org.eclipse.rse.core.model.ISystemProfile; +import org.eclipse.rse.core.model.ISystemProfileManager; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.model.SystemChildrenContentsType; import org.eclipse.rse.core.references.IRSEBaseReferencingObject; -import org.eclipse.rse.core.servicesubsystem.IServiceSubSystem; -import org.eclipse.rse.core.servicesubsystem.IServiceSubSystemConfiguration; import org.eclipse.rse.core.subsystems.IConnectorService; +import org.eclipse.rse.core.subsystems.IServiceSubSystem; +import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy; import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; -import org.eclipse.rse.filters.ISystemFilterReference; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemHostPool; -import org.eclipse.rse.model.ISystemProfile; -import org.eclipse.rse.model.ISystemProfileManager; -import org.eclipse.rse.model.ISystemRegistry; -import org.eclipse.rse.model.ISystemRemoteChangeEvent; -import org.eclipse.rse.model.ISystemRemoteChangeListener; -import org.eclipse.rse.model.ISystemResourceChangeEvent; -import org.eclipse.rse.model.ISystemResourceChangeEvents; -import org.eclipse.rse.model.ISystemResourceChangeListener; -import org.eclipse.rse.model.SystemRemoteChangeEvent; -import org.eclipse.rse.model.SystemResourceChangeEvent; +import org.eclipse.rse.filters.SystemFilterPool; +import org.eclipse.rse.filters.SystemFilterStartHere; +import org.eclipse.rse.internal.model.SystemHostPool; +import org.eclipse.rse.internal.model.SystemModelChangeEvent; +import org.eclipse.rse.internal.model.SystemModelChangeEventManager; +import org.eclipse.rse.internal.model.SystemPostableEventNotifier; +import org.eclipse.rse.internal.model.SystemPreferenceChangeManager; +import org.eclipse.rse.internal.model.SystemProfileManager; +import org.eclipse.rse.internal.model.SystemRemoteChangeEventManager; +import org.eclipse.rse.internal.model.SystemResourceChangeManager; +import org.eclipse.rse.internal.model.SystemScratchpad; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.ui.ISystemMessages; @@ -72,10 +79,10 @@ import org.eclipse.rse.ui.RSESystemTypeAdapter; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; +import org.eclipse.rse.ui.view.ISystemViewInputProvider; import org.eclipse.rse.ui.view.SystemDNDTransferRunnable; import org.eclipse.rse.ui.view.SystemView; import org.eclipse.rse.ui.view.SystemViewDataDropAdapter; -import org.eclipse.rse.ui.wizards.ISystemNewConnectionWizardPage; import org.eclipse.swt.dnd.Clipboard; import org.eclipse.swt.dnd.FileTransfer; import org.eclipse.swt.dnd.TextTransfer; @@ -91,7 +98,7 @@ import org.eclipse.ui.part.ResourceTransfer; /** * Registry for all connections. */ -public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents +public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents, ISystemViewInputProvider { private static Exception lastException = null; @@ -1701,7 +1708,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents * in its plugin.xml file. Thus, it is effecient as it need not bring to live a * subsystem factory just to test its parent class type. * - * @see org.eclipse.rse.core.model.ISubSystemConfigurationCategories + * @see ISubSystemConfigurationCategories */ public IHost[] getHostsBySubSystemConfigurationCategory(String factoryCategory) { @@ -1905,7 +1912,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents } } if ((systemType != null) && (systemType.equals(IRSESystemType.SYSTEMTYPE_LOCAL) && (v.size() == 0))) - v.addElement("localhost"); //$NON-NLS-1$ + v.addElement("localhost"); String[] names = new String[v.size()]; for (int idx = 0; idx < names.length; idx++) names[idx] = (String) v.elementAt(idx); @@ -1945,8 +1952,8 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents private Object getObjectFor(String str) { // first extract subsystem id - int connectionDelim = str.indexOf(":"); //$NON-NLS-1$ - int subsystemDelim = str.indexOf(":", connectionDelim + 1); //$NON-NLS-1$ + int connectionDelim = str.indexOf(":"); + int subsystemDelim = str.indexOf(":", connectionDelim + 1); String subSystemId = str.substring(0, subsystemDelim); String srcKey = str.substring(subsystemDelim + 1, str.length()); @@ -2005,7 +2012,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents byte[] result = data.getData(); //StringTokenizer tokenizer = new StringTokenizer(new String(result), SystemViewDataDropAdapter.RESOURCE_SEPARATOR); - String[] tokens = (new String(result)).split("\\"+SystemViewDataDropAdapter.RESOURCE_SEPARATOR); //$NON-NLS-1$ + String[] tokens = (new String(result)).split("\\"+SystemViewDataDropAdapter.RESOURCE_SEPARATOR); for (int i = 0;i < tokens.length; i++) { @@ -2036,12 +2043,15 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents // Local File transfer FileTransfer fileTransfer = FileTransfer.getInstance(); object = clipboard.getContents(fileTransfer); - if (object instanceof String[]) + if (object != null) { String[] fileData = (String[]) object; - for (int i = 0; i < fileData.length; i++) + if (fileData != null) { - srcObjects.add(fileData[i]); + for (int i = 0; i < fileData.length; i++) + { + srcObjects.add(fileData[i]); + } } } } @@ -2049,10 +2059,13 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents { TextTransfer textTransfer = TextTransfer.getInstance(); object = clipboard.getContents(textTransfer); - if (object instanceof String) + if (object != null) { String textData = (String) object; - srcObjects.add(textData); + if (textData != null) + { + srcObjects.add(textData); + } } } return srcObjects; @@ -2092,8 +2105,8 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents localConn = createHost( profile.getName(), IRSESystemType.SYSTEMTYPE_LOCAL, name, // connection name - "localhost", // hostname //$NON-NLS-1$ - "", // description //$NON-NLS-1$ + "localhost", // hostname + "", // description // DY: defect 42101, description cannot be null // null, // description userId, // default user Id @@ -2663,7 +2676,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents } catch (InterruptedException exc) { - System.out.println("Cancelled"); + System.out.println("Cacnelled"); cancelled = true; } catch (Exception exc) @@ -3192,5 +3205,14 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents public boolean isConflicting(ISchedulingRule rule) { return rule == this; + } + public ISystemFilterStartHere getSystemFilterStartHere() { + return SystemFilterStartHere.getDefault(); } + + public ISystemFilterPool getSystemFilterPool() + { + return SystemFilterPool.getDefault(); + } + }//SystemRegistryImpl \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRemoteElementResourceSet.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRemoteElementResourceSet.java index 69807ea17f7..e154eee1b95 100644 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRemoteElementResourceSet.java +++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRemoteElementResourceSet.java @@ -87,4 +87,4 @@ public class SystemRemoteElementResourceSet extends AbstractSystemResourceSet return _adapter.getAbsoluteName(resource); } -} +} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemSignonInformation.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemSignonInformation.java deleted file mode 100644 index 8780712f114..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemSignonInformation.java +++ /dev/null @@ -1,121 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.model; - - -/** - * This class encapsulates the signon information required for a remote system. This class - * must be secure and never disclose the password for the remote system in its unencrypted form. - * However the encrypted form of the password is not considered secret information and can be - * accessed by anyone. - * - * @author yantzi - */ -public final class SystemSignonInformation { - - - private String _hostname, _userid, _systemType, _password; - - /** - * Default no-arg constructor - */ - public SystemSignonInformation() - { - } - - /** - * Constructor for SystemSignonInformation. - */ - public SystemSignonInformation(String hostname, String userid, String systemType) { - _hostname = hostname;//RSEUIPlugin.getQualifiedHostName(hostname).toUpperCase(); - _userid = userid; - _systemType = systemType; - } - - /** - * Constructor for SystemSignonInformation. - */ - public SystemSignonInformation(String hostname, String userid, String password, String systemType) { - _hostname = hostname;//RSEUIPlugin.getQualifiedHostName(hostname).toUpperCase(); - _userid = userid; - _password = password; - _systemType = systemType; - } - - /** - * Returns the hostname of the remote system - * @return String - */ - public String getHostname() { - return _hostname; - } - - /** - * Returns the systemType of the remote system - * @return String - */ - public String getSystemType() { - return _systemType; - } - - /** - * Returns the userid for the remote system - * @return String - */ - public String getUserid() { - return _userid; - } - - /** - * Return the password for the remote system - */ - public String getPassword() { - return _password; - } - - /** - * Sets the password for the remote system - */ - public void setPassword(String string) { - _password = string; - } - - /** - * Sets the hostname. - * @param hostname The hostname to set - */ - public void setHostname(String hostname) { - _hostname = hostname;//RSEUIPlugin.getQualifiedHostName(hostname).toUpperCase(); - } - - /** - * Sets the systemType. - * @param systemType The systemType to set - */ - public void setSystemType(String systemType) { - _systemType = systemType; - } - - /** - * Sets the userid. - * @param userid The userid to set - */ - public void setUserid(String userid) { - _userid = userid; - } - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemStartHere.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemStartHere.java index 1c071fac233..06440ac65b9 100644 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemStartHere.java +++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemStartHere.java @@ -15,6 +15,10 @@ ********************************************************************************/ package org.eclipse.rse.model; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemProfile; +import org.eclipse.rse.core.model.ISystemProfileManager; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.internal.model.SystemProfileManager; @@ -61,7 +65,7 @@ public class SystemStartHere *

  • "Local" * * @see org.eclipse.rse.core.IRSESystemType - * @see org.eclipse.rse.model.ISystemRegistry#getHostsBySystemType(String) + * @see org.eclipse.rse.core.model.ISystemRegistry#getHostsBySystemType(String) */ public static IHost[] getConnectionsBySystemType(String systemType) { @@ -73,7 +77,7 @@ public class SystemStartHere *

    * SAME AS: getSystemRegistry().getConnectionsBySubSystemConfiguration(subsystemConfiguration) * @param subsystemConfiguration A subsystem configuration object. - * @see org.eclipse.rse.model.ISystemRegistry#getHostsBySubSystemConfiguration(ISubSystemConfiguration) + * @see org.eclipse.rse.core.model.ISystemRegistry#getHostsBySubSystemConfiguration(ISubSystemConfiguration) * @see #getConnectionsBySubSystemConfiguration(String) */ public static IHost[] getConnectionsBySubSystemConfiguration(ISubSystemConfiguration subsystemConfiguration) @@ -98,7 +102,7 @@ public class SystemStartHere *

    * SAME AS: getSystemRegistry().getSubSystems(subsystemConfigurationId) * @param subsystemConfigurationId The subsystem configuration id as given in its plugin.xml id attribute for the subsystemConfigurations extension point - * @see org.eclipse.rse.model.ISystemRegistry#getSubSystems(String) + * @see org.eclipse.rse.core.model.ISystemRegistry#getSubSystems(String) * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getId() */ public static ISubSystem[] getSubSystems(String subsystemConfigurationId) @@ -111,7 +115,7 @@ public class SystemStartHere * SAME AS: getSystemRegistry().getSubSystems(subsystemConfigurationId, connection) * @param subsystemConfigurationId The subsystem configuration id as given in its plugin.xml id attribute for the subsystemConfigurations extension point * @param connection The connection object you wish to get the subsystems for. Typically there is only one subsystem per object. - * @see org.eclipse.rse.model.ISystemRegistry#getSubSystems(String, IHost) + * @see org.eclipse.rse.core.model.ISystemRegistry#getSubSystems(String, IHost) * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getId() */ public static ISubSystem[] getSubSystems(String subsystemConfigurationId, IHost connection) diff --git a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/PropertyFileProvider.java b/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/PropertyFileProvider.java deleted file mode 100644 index 5e9232fe438..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/PropertyFileProvider.java +++ /dev/null @@ -1,706 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed the initial implementation: - * David McKnight, David Dykstal. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ -package org.eclipse.rse.internal.persistence; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.PrintWriter; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Set; -import java.util.TreeMap; -import java.util.TreeSet; -import java.util.Vector; -import java.util.regex.Pattern; - -import org.eclipse.core.resources.IContainer; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IFolder; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.Path; -import org.eclipse.rse.core.SystemResourceManager; -import org.eclipse.rse.persistence.IRSEPersistenceProvider; -import org.eclipse.rse.persistence.dom.IRSEDOMConstants; -import org.eclipse.rse.persistence.dom.RSEDOM; -import org.eclipse.rse.persistence.dom.RSEDOMNode; -import org.eclipse.rse.persistence.dom.RSEDOMNodeAttribute; - -/** - * This is class is used to restore an RSE DOM from disk and import it into RSE. - * It stores the DOM as a tree of folders and .properties files. - */ -public class PropertyFileProvider implements IRSEPersistenceProvider { - - private static final String NULL_VALUE_STRING = "null"; //$NON-NLS-1$ - private static final String PROPERTIES_FILE_NAME = "node.properties"; //$NON-NLS-1$ - - /* Metatype names */ - private static final String MT_ATTRIBUTE_TYPE = "attr-type"; //$NON-NLS-1$ - private static final String MT_ATTRIBUTE = "attr"; //$NON-NLS-1$ - private static final String MT_CHILD = "child"; //$NON-NLS-1$ - private static final String MT_NODE_TYPE = "n-type"; //$NON-NLS-1$ - private static final String MT_NODE_NAME = "n-name"; //$NON-NLS-1$ - private static final String MT_REFERENCE = "ref"; //$NON-NLS-1$ - - /* Type abbreviations */ - private static final String AB_SUBSYSTEM = "SS"; //$NON-NLS-1$ - private static final String AB_SERVICE_LAUNCHER = "SL"; //$NON-NLS-1$ - private static final String AB_PROPERTY_SET = "PS"; //$NON-NLS-1$ - private static final String AB_PROPERTY = "P"; //$NON-NLS-1$ - private static final String AB_HOST = "H"; //$NON-NLS-1$ - private static final String AB_FILTER_STRING = "FS"; //$NON-NLS-1$ - private static final String AB_FILTER_POOL_REFERENCE = "FPR"; //$NON-NLS-1$ - private static final String AB_FILTER_POOL = "FP"; //$NON-NLS-1$ - private static final String AB_FILTER = "F"; //$NON-NLS-1$ - private static final String AB_CONNECTOR_SERVICE = "CS"; //$NON-NLS-1$ - private static final String AB_PROFILE = "PRF"; //$NON-NLS-1$ - - private Pattern period = Pattern.compile("\\."); //$NON-NLS-1$ - private Map typeQualifiers = getTypeQualifiers(); - - /* (non-Javadoc) - * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#getSavedProfileNames() - */ - public String[] getSavedProfileNames() { - List names = new Vector(10); - IFolder providerFolder = getProviderFolder(); - try { - IResource[] profileCandidates = providerFolder.members(); - for (int i = 0; i < profileCandidates.length; i++) { - IResource profileCandidate = profileCandidates[i]; - if (profileCandidate.getType() == IResource.FOLDER) { - String candidateName = profileCandidate.getName(); - String[] parts = split(candidateName, 2); - if (parts[0].equals(AB_PROFILE)) { - String name = parts[1]; - names.add(name); - } - } - } - } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - String[] result = new String[names.size()]; - names.toArray(result); - return result; - } - - /* (non-Javadoc) - * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#saveRSEDOM(org.eclipse.rse.persistence.dom.RSEDOM, org.eclipse.core.runtime.IProgressMonitor) - */ - public boolean saveRSEDOM(RSEDOM dom, IProgressMonitor monitor) { - IFolder providerFolder = getProviderFolder(); -// String profileName = dom.getName(); -// System.out.println("saving profile " + profileName + " to " + providerFolder.getFullPath().toString() + "..."); - try { - int n = countNodes(dom); - if (monitor != null) monitor.beginTask("Saving DOM", n); - saveNode(dom, providerFolder, monitor); - if (monitor != null) monitor.done(); - } catch (Exception e) { - e.printStackTrace(); - return false; - } - return true; - } - - /** - * Saves a node from the DOM to the file system. - * @param node The node to save. - * @param parentFolder The folder in which to save this node. The node will be a - * subfolder of this folder. - * @param monitor The progress monitor. If the monitor has been cancel then - * this method will do nothing and return null. - * @return The name of the folder saving this node. Can be used for constructing - * references to children. May return null if the monitor has been canceled. - */ - private String saveNode(RSEDOMNode node, IFolder parentFolder, IProgressMonitor monitor) { - if (monitor != null && monitor.isCanceled()) return null; - String nodeFolderName = getSaveFolderName(node); - IFolder nodeFolder = getFolder(parentFolder, nodeFolderName); - Properties properties = getProperties(node, false, monitor); - RSEDOMNode[] children = node.getChildren(); - Set childFolderNames = new HashSet(); - for (int i = 0; i < children.length; i++) { - RSEDOMNode child = children[i]; - String index = getIndexString(i); - if (!isNodeEmbedded(child)) { - String key = combine(MT_REFERENCE, index); - String childFolderName = saveNode(child, nodeFolder, monitor); - if (childFolderName != null) properties.put(key, childFolderName); - childFolderNames.add(childFolderName); - } - } - removeFolders(nodeFolder, childFolderNames); - String propertiesFileName = PROPERTIES_FILE_NAME; - IFile propertiesFile = nodeFolder.getFile(propertiesFileName); - writeProperties(properties, "RSE DOM Node", propertiesFile); - return nodeFolderName; - } - - /** - * Removes childFolders from the parent folder that are not in the keep set. - * Typically used to clean renamed nodes from the tree on a save operation. - * @param parentFolder The folder whose subfolders are to be examined. - * @param keepSet The names of the folders that should be kept. Others are discarded. - */ - private void removeFolders(IFolder parentFolder, Set keepSet) { - try { - IResource[] children = parentFolder.members(); - for (int i = 0; i < children.length; i++) { - IResource child = children[i]; - if (child.getType() == IResource.FOLDER) { - String childFolderName = child.getName(); - if (!keepSet.contains(childFolderName)) { - child.delete(true, null); - } - } - } - } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - private static final String VALID = "abcdefghijklmnopqrstuvwxyz0123456789-._"; //$NON-NLS-1$ - private static final String UPPER = "ABCDEFGHIJKLMNOPQRTSUVWXYZ"; //$NON-NLS-1$ - /** - * Returns the name of a folder that can be used to store a node of a particular - * type. Since this is a folder, its name must conform to the rules of the file - * system. The names are derived from the name and type of the node. Note that the - * actual name of the node is also stored as a property so we need not attempt - * to recover the node name from the folder name. - * @param node The node that will eventually be stored in this folder. - * @return The name of the folder to store this node. - */ - private String getSaveFolderName(RSEDOMNode node) { - String type = node.getType(); - type = (String) typeQualifiers.get(type); - String name = node.getName(); - int p = name.indexOf(':'); - if (p >= 0) { - name = name.substring(p + 1); - } - StringBuffer buf = new StringBuffer(name.length()); - char[] chars = name.toCharArray(); - long suffix = 0; - for (int i = 0; i < chars.length; i++) { - char c = chars[i]; - suffix *= 2; - if (VALID.indexOf(c) >= 0) { - buf.append(c); - } else if (UPPER.indexOf(c) >= 0) { // if uppercase - buf.append(Character.toLowerCase(c)); - suffix += 1; - } else if (c == ' ') { // if space - buf.append('_'); - suffix += 1; - } else { // if out of range - buf.append('#'); - buf.append(Integer.toHexString(c)); - buf.append('#'); - } - } - name = buf.toString() + "_" + Long.toString(suffix); //$NON-NLS-1$ - String result = combine(type, name); - return result; - } - - private Map getTypeQualifiers() { - Map typeQualifiers = new HashMap(); - typeQualifiers.put(IRSEDOMConstants.TYPE_CONNECTOR_SERVICE, AB_CONNECTOR_SERVICE); - typeQualifiers.put(IRSEDOMConstants.TYPE_FILTER, AB_FILTER); - typeQualifiers.put(IRSEDOMConstants.TYPE_FILTER_POOL, AB_FILTER_POOL); - typeQualifiers.put(IRSEDOMConstants.TYPE_FILTER_POOL_REFERENCE, AB_FILTER_POOL_REFERENCE); - typeQualifiers.put(IRSEDOMConstants.TYPE_FILTER_STRING, AB_FILTER_STRING); - typeQualifiers.put(IRSEDOMConstants.TYPE_HOST, AB_HOST); - typeQualifiers.put(IRSEDOMConstants.TYPE_PROFILE, AB_PROFILE); - typeQualifiers.put(IRSEDOMConstants.TYPE_PROPERTY, AB_PROPERTY); - typeQualifiers.put(IRSEDOMConstants.TYPE_PROPERTY_SET, AB_PROPERTY_SET); - typeQualifiers.put(IRSEDOMConstants.TYPE_SERVER_LAUNCHER, AB_SERVICE_LAUNCHER); - typeQualifiers.put(IRSEDOMConstants.TYPE_SUBSYSTEM, AB_SUBSYSTEM); - return typeQualifiers; - } - - /** - * Write a set of properties to a file. - * @param properties The Properties object to write. - * @param header The header to include in the properties file. - * @param file The IFile which will contain the properties. - * @param monitor The progress monitor. - */ - private void writeProperties(Properties properties, String header, IFile file) { -// System.out.println("writing "+file.getFullPath()+"..."); - ByteArrayOutputStream outStream = new ByteArrayOutputStream(500); - PrintWriter out = new PrintWriter(outStream); - out.println("# " + header); //$NON-NLS-1$ - Map map = new TreeMap(properties); - Set keys = map.keySet(); - - for (Iterator z = keys.iterator(); z.hasNext();) { - String key = (String) z.next(); - String value = (String)map.get(key); - String keyvalue = key + "=" + escapeValue(value); //$NON-NLS-1$ -// System.out.println("writing "+keyvalue); - out.println(keyvalue); - } - out.close(); -// System.out.println("...wrote "+file.getFullPath()); - ByteArrayInputStream inStream = new ByteArrayInputStream(outStream.toByteArray()); - try { - if (!file.exists()) { - file.create(inStream, true, null); - } else { - file.setContents(inStream, true, true, null); - } - } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - /** - * Tests if a node's definition should be embedded in its parent's definition or - * if it should be a separate definition. The test is usually based on node type. - * Currently only filter strings are embedded in their parent filter definition. - * @param node The node to be tested. - * @return true if the node is to be embedded. - */ - private boolean isNodeEmbedded(RSEDOMNode node) { - boolean result = false; - if (node.getType().equals(IRSEDOMConstants.TYPE_FILTER_STRING)) { - result = true; - } - return result; - } - - /** - * Transforms an integer into its five digit counterpart complete with leading - * zeroes. - * @param i an integer from 0 to 99999. - * @return a string equivalent from "00000" to "99999" - */ - private String getIndexString(int i) { - if (i < 0 || i > 99999) throw new IllegalArgumentException("Argument must be between 0 and 99999"); - String index = "00000" + Integer.toString(i); //$NON-NLS-1$ - index = index.substring(index.length() - 5); - return index; - } - - /** - * "Fixes" a value. Values in Properties objects may not be null. Changes all - * null values to the string "null" and escapes the characters in other values. - * @param value The value to check. - * @return The fixed value - */ - private String fixValue(String value) { - if (value == null) return NULL_VALUE_STRING; - return value; - } - - /** - * Escapes the characters in the supplied string according to the rules - * for properties files. - * @param value The value to examine. - * @return The equivalent value with escapes. - */ - private String escapeValue(String value) { - StringBuffer buffer = new StringBuffer(value.length() + 20); - char[] characters = value.toCharArray(); - for (int i = 0; i < characters.length; i++) { - char c = characters[i]; - if (c == '\\') { - buffer.append("\\\\"); //$NON-NLS-1$ - } else if (c == '\t') { - buffer.append("\\t"); //$NON-NLS-1$ - } else if (c == '\f') { - buffer.append("\\f"); //$NON-NLS-1$ - } else if (c == '\n') { - buffer.append("\\n"); //$NON-NLS-1$ - } else if (c == '\r') { - buffer.append("\\r"); //$NON-NLS-1$ - } else if ((c < '\u0020' && c > '\u007E')) { - String cString = "0000" + Integer.toHexString(c); //$NON-NLS-1$ - cString = cString.substring(cString.length() - 4); - cString = "\\u" + cString; //$NON-NLS-1$ - buffer.append(cString); - } else if ("=!#:".indexOf(c) >= 0) { //$NON-NLS-1$ - buffer.append('\\'); - buffer.append(c); - } else { - buffer.append(c); - } - } - return buffer.toString(); - } - - /** - * Constructs a properties object containing all the properties for this node. - * The following properties exist: - * name property, type property, embedded child properties, and referenced - * child properties. Each property has its own key format in the Properties - * object. - * @param node The node to extract the properties from. - * @param force Force children to be embedded rather than reference. - * @param monitor The progress monitor. The work count is increased by one each time - * this method is invoked. - * @return The Properties object containing that node definition. - */ - private Properties getProperties(RSEDOMNode node, boolean force, IProgressMonitor monitor) { - Properties properties = new Properties(); - properties.put(MT_NODE_NAME, node.getName()); - properties.put(MT_NODE_TYPE, node.getType()); - properties.putAll(getAttributes(node)); - RSEDOMNode[] children = node.getChildren(); - for (int i = 0; i < children.length; i++) { - RSEDOMNode child = children[i]; - String index = getIndexString(i); - if (force || isNodeEmbedded(child)) { - String prefix = combine(MT_CHILD, index); - Properties childProperties = getProperties(child, true, monitor); - Enumeration e = childProperties.keys(); - while (e.hasMoreElements()) { - String key = (String) e.nextElement(); - String value = childProperties.getProperty(key); - String newKey = combine(prefix, key); - properties.put(newKey, value); - } - } - } - if (monitor != null) monitor.worked(1); - return properties; - } - - /** - * Constructs a Properties object from the attributes present in a DOM node. - * @param node The node containing the attributes. Keys for attributes are of the - * form "attribute.[attribute-name]". If the attribute has a type then there - * will also be an "attribute-type.[attribute-name]" property. - * [attribute-name] may contain periods but must not be null. - * @return The newly constructed Properties object. - */ - private Properties getAttributes(RSEDOMNode node) { - Properties properties = new Properties(); - RSEDOMNodeAttribute[] attributes = node.getAttributes(); - for (int i = 0; i < attributes.length; i++) { - RSEDOMNodeAttribute attribute = attributes[i]; - String attributeName = attribute.getKey(); - String propertyKey = combine(MT_ATTRIBUTE, attributeName); - properties.put(propertyKey, fixValue(attribute.getValue())); - String attributeType = attribute.getType(); - if (attributeType != null) { - propertyKey = combine(MT_ATTRIBUTE_TYPE, attributeName); - properties.put(propertyKey, attributeType); - } - } - return properties; - } - - /** - * Count the number of nodes in a tree rooted in the supplied node. The - * supplied node is counted so the mininum result is one. - * @param node The root of the tree. - * @return The node count. - */ - private int countNodes(RSEDOMNode node) { - RSEDOMNode[] children = node.getChildren(); - int result = 1; - for (int i = 0; i < children.length; i++) { - RSEDOMNode child = children[i]; - result += countNodes(child); - } - return result; - } - - /* (non-Javadoc) - * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#loadRSEDOM(org.eclipse.rse.model.ISystemProfileManager, java.lang.String, org.eclipse.core.runtime.IProgressMonitor) - */ - public RSEDOM loadRSEDOM(String profileName, IProgressMonitor monitor) { - RSEDOM dom = null; - IFolder profileFolder = getProfileFolder(profileName); - if (profileFolder.exists()) { - //System.out.println("loading from " + profileFolder.getFullPath().toString() + "..."); - int n = countPropertiesFiles(profileFolder); - if (monitor != null) monitor.beginTask("Loading DOM", n); - dom = (RSEDOM) loadNode(null, profileFolder, monitor); - if (monitor != null) monitor.done(); - } else { - //System.out.println(profileFolder.getFullPath().toString() + " does not exist."); - } - return dom; - } - - /** - * Counts the number of properties files in this folder and below. This provides - * a lower bound to the number of nodes that have to be created from this - * persistent form of a DOM. - * @param folder - * @return the number of properties files found. - */ - private int countPropertiesFiles(IFolder folder) { - int result = 0; - IFile propertiesFile = folder.getFile(PROPERTIES_FILE_NAME); - if (propertiesFile.exists()) { - result += 1; - try { - IResource[] members = folder.members(); - for (int i = 0; i < members.length; i++) { - IResource member = members[i]; - if (member.getType() == IResource.FOLDER) { - IFolder childFolder = (IFolder) member; - result += countPropertiesFiles(childFolder); - } - } - } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - return result; - } - - /** - * Loads a node from a folder. - * @param parent The parent of the node to be created. If null then this node is assumed to - * be a DOM root node (RSEDOM). - * @param nodeFolder The folder in which the node.properties file of this node is found. - * @param monitor The monitor used to report progress and cancelation. If the monitor is - * in canceled state then it this does method does nothing and returns null. If the monitor - * is not canceled then its work count is incremented by one. - * @return The newly loaded node. - */ - private RSEDOMNode loadNode(RSEDOMNode parent, IFolder nodeFolder, IProgressMonitor monitor) { - RSEDOMNode node = null; - if (monitor == null || !monitor.isCanceled()) { - Properties properties = loadProperties(nodeFolder); - if (properties != null) { - node = makeNode(parent, nodeFolder, properties, monitor); - } - if (monitor != null) monitor.worked(1); - } - return node; - } - - /** - * Loads the properties found in the folder. Returns null if no properties - * file was found. - * @param folder The folder in which to look for properties. - * @return The Properties object. - */ - private Properties loadProperties(IFolder folder) { - Properties properties = null; - IFile attributeFile = folder.getFile(PROPERTIES_FILE_NAME); - if (attributeFile.exists()) { - properties = new Properties(); - try { - InputStream inStream = attributeFile.getContents(); - try { - properties.load(inStream); - inStream.close(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - return properties; - } - - /** - * Makes a new RSEDOMNode from a set of properties. The properties must (at least) include - * a "name" property and a "type" property. Any child nodes are created and attached as well. - * @param parent The parent node of the node to be created. - * @param nodeFolder The folder in which referenced child folders can be found. This will - * almost always be the folder in which the properties for the node to be created were found. - * @param properties The properties from which to create the node. - * @param monitor a monitor to support cancelation and progress reporting. - * @return the newly created DOM node and its children. - */ - private RSEDOMNode makeNode(RSEDOMNode parent, IFolder nodeFolder, Properties properties, IProgressMonitor monitor) { - String nodeType = properties.getProperty(MT_NODE_TYPE); - String nodeName = properties.getProperty(MT_NODE_NAME); - RSEDOMNode node = (parent == null) ? new RSEDOM(nodeName) : new RSEDOMNode(parent, nodeType, nodeName); - node.setRestoring(true); - Set keys = properties.keySet(); - Map attributes = new HashMap(); - Map attributeTypes = new HashMap(); - Map childPropertiesMap = new HashMap(); - Set childNames = new TreeSet(); // child names are 5 digit strings, a tree set is used to maintain ordering - Set referenceNames = new TreeSet(); // ditto for reference names - for (Iterator z = keys.iterator(); z.hasNext();) { - String key = (String) z.next(); - String[] words = split(key, 2); - String metatype = words[0]; - if (metatype.equals(MT_ATTRIBUTE)) { - String value = properties.getProperty(key); - attributes.put(words[1], value); - } else if (metatype.equals(MT_ATTRIBUTE_TYPE)) { - String type = properties.getProperty(key); - attributeTypes.put(words[1], type); - } else if (metatype.equals(MT_REFERENCE)) { - String referenceName = words[1]; - referenceNames.add(referenceName); - } else if (metatype.equals(MT_CHILD)) { - String value = properties.getProperty(key); - words = split(words[1], 2); - String childName = words[0]; - childNames.add(childName); - String newKey = words[1]; - Properties p = getProperties(childPropertiesMap, childName); - p.put(newKey, value); - } - } - Set attributeNames = attributes.keySet(); - for (Iterator z = attributeNames.iterator(); z.hasNext();) { - String attributeName = (String) z.next(); - String attributeValue = (String) attributes.get(attributeName); - if (attributeValue.equals(NULL_VALUE_STRING)) attributeValue = null; - String attributeType = (String) attributeTypes.get(attributeName); - node.addAttribute(attributeName, attributeValue, attributeType); - } - for (Iterator z = childNames.iterator(); z.hasNext();) { - String childName = (String) z.next(); - Properties p = getProperties(childPropertiesMap, childName); - makeNode(node, nodeFolder, p, monitor); - } - for (Iterator z = referenceNames.iterator(); z.hasNext();) { - String referenceName = (String) z.next(); - String key = combine(MT_REFERENCE, referenceName); - String childFolderName = properties.getProperty(key); - IFolder childFolder = getFolder(nodeFolder, childFolderName); - loadNode(node, childFolder, monitor); - } - node.setRestoring(false); - return node; - } - - /** - * Returns a Properties object from the given Map that holds them using the - * selector String. Creates a new Properties object and places it in the map - * if one does not exist for the selector. - * @param propertiesMap The map in which to look for Properties objects. - * @param selector The name of the Properties object - * @return a Properties object. - */ - private Properties getProperties(Map propertiesMap, String selector) { - Properties p = (Properties)propertiesMap.get(selector); - if (p == null) { - p = new Properties(); - propertiesMap.put(selector, p); - } - return p; - } - - /** - * Returns the IFolder in which this persistence provider stores its profiles. - * This will create the folder if the folder was not found. - * @return The folder that was created or found. - */ - private IFolder getProviderFolder() { - IProject project = SystemResourceManager.getRemoteSystemsProject(); - try { - project.refreshLocal(IResource.DEPTH_INFINITE, null); - } catch (Exception e) { - } - //IFolder providerFolder = getFolder(project, "org.eclipse.rse.dom.properties"); - IFolder providerFolder = getFolder(project, "dom.properties"); //$NON-NLS-1$ - return providerFolder; - } - - /** - * Returns the IFolder in which a profile is stored. - * @return The folder that was created or found. - */ - private IFolder getProfileFolder(String profileName) { - String profileFolderName = combine(AB_PROFILE, profileName); - IFolder providerFolder = getProviderFolder(); - IFolder profileFolder = getFolder(providerFolder, profileFolderName); - return profileFolder; - } - - /** - * Returns the specified folder of the parent container. If the folder does - * not exist it creates it. - * @param parent the parent container - typically a project or folder - * @param name the name of the folder to find or create - * @return the found or created folder - */ - private IFolder getFolder(IContainer parent, String name) { - IPath path = new Path(name); - IFolder folder = parent.getFolder(path); - if (!folder.exists()) { - try { - folder.create(IResource.NONE, true, null); - } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - return folder; - } - - /** - * Convenience method to combine two names into one. The individual names in the - * combined name are separated by periods. - * @param typeName The first name. - * @param nodeName The second name - * @return the combined name. - */ - private String combine(String typeName, String nodeName) { - return combine(new String[] {typeName, nodeName}); - } - - /** - * The generic method for creating a qualified name from a string of segments. - * The individual names are separated by periods. - * @param names The names to combine - * @return The combined name. - */ - private String combine(String[] names) { - StringBuffer buf = new StringBuffer(100); - for (int i = 0; i < names.length; i++) { - String name = names[i]; - if (i > 0) buf.append('.'); - buf.append(name); - } - return buf.toString(); - } - - /** - * Splits a combined name into its component parts. The period is used as the name - * separator. If a limit > 0 is specified the return value will contain at most that - * number of segments. The last segment may, in fact, be split some more. - * @param longName The name to be split - * @param limit The number of parts to split the name into. - * @return The parts of the name. - */ - private String[] split(String longName, int limit) { - return period.split(longName, limit); - } -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/RSEPersistenceManager.java b/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/RSEPersistenceManager.java deleted file mode 100644 index 40891a38c09..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/RSEPersistenceManager.java +++ /dev/null @@ -1,401 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.internal.persistence; - -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IExtensionRegistry; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.rse.core.RSECorePlugin; -import org.eclipse.rse.core.SystemResourceManager; -import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.internal.filters.SystemFilterPoolManager; -import org.eclipse.rse.internal.persistence.dom.RSEDOMExporter; -import org.eclipse.rse.internal.persistence.dom.RSEDOMImporter; -import org.eclipse.rse.logging.Logger; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemHostPool; -import org.eclipse.rse.model.ISystemProfile; -import org.eclipse.rse.model.ISystemProfileManager; -import org.eclipse.rse.persistence.IRSEPersistenceManager; -import org.eclipse.rse.persistence.IRSEPersistenceProvider; -import org.eclipse.rse.persistence.dom.RSEDOM; -import org.eclipse.rse.ui.RSEUIPlugin; - -/** - * The persistence manager controls all aspects of persisting the RSE data model. It will both - * save and restore this model. There should be only persistence manager in existence. This instance - * can be retrieved using RSEUIPlugin.getThePersistenceManager. - * @see RSEUIPlugin#getThePersistenceManager() - */ -public class RSEPersistenceManager implements IRSEPersistenceManager { - - private static final int STATE_NONE = 0; - private static final int STATE_IMPORTING = 1; - private static final int STATE_EXPORTING = 2; - - private Map loadedProviders = new HashMap(10); - private int _currentState = STATE_NONE; - private RSEDOMExporter _exporter; - private RSEDOMImporter _importer; - - public RSEPersistenceManager() { - _exporter = RSEDOMExporter.getInstance(); - _importer = RSEDOMImporter.getInstance(); - } - - public void registerRSEPersistenceProvider(String id, IRSEPersistenceProvider provider) { - loadedProviders.put(id, provider); - } - - /** - * Returns the persistence provider denoted by the id. Only one instance of this - * persistence provider is created. - * @param id The id of the persistence provider, as denoted by the id attribute on its declaration. - * @return an IRSEPersistenceProvider which may be null if this id is not found. - */ - public IRSEPersistenceProvider getRSEPersistenceProvider(String id) { - Logger logger = RSECorePlugin.getDefault().getLogger(); - IRSEPersistenceProvider provider = (IRSEPersistenceProvider) loadedProviders.get(id); - if (provider == null) { - IExtensionRegistry registry = Platform.getExtensionRegistry(); - IConfigurationElement[] providerCandidates = registry.getConfigurationElementsFor("org.eclipse.rse.ui", "persistenceProviders"); //$NON-NLS-1$ //$NON-NLS-2$ - for (int j = 0; j < providerCandidates.length; j++) { - IConfigurationElement providerCandidate = providerCandidates[j]; - if (providerCandidate.getName().equals("persistenceProvider")) { //$NON-NLS-1$ - String candidateId = providerCandidate.getAttribute("id"); //$NON-NLS-1$ - if (candidateId != null) { - if (candidateId.equals(id)) { - try { - provider = (IRSEPersistenceProvider) providerCandidate.createExecutableExtension("class"); //$NON-NLS-1$ - } catch (CoreException e) { - logger.logError("Exception loading persistence provider", e); // DWD nls - } - } - } else { - logger.logError("Missing id attribute in persistenceProvider element", null); // DWD nls - } - } else { - logger.logError("Invalid element in persistenceProviders extension point", null); // DWD nls - } - } - if (provider == null) { - logger.logError("Persistence provider not found.", null); // DWD nls - } - loadedProviders.put(id, provider); // even if provider is null - } - return provider; - } - - /** - * @return the default IRSEPersistenceProvider for this installation. - * TODO: need to determine what this is. Having more than one is problematic. - */ - public IRSEPersistenceProvider getRSEPersistenceProvider() { - IRSEPersistenceProvider provider = getRSEPersistenceProvider("org.eclipse.rse.persistence.PropertyFileProvider"); //$NON-NLS-1$ - return provider; - } - - public boolean restore(ISystemProfileManager profileManager) { - return load(profileManager); - } - - /** - * Restore a profile of a given name from disk... - */ - protected ISystemProfile restoreProfile(ISystemProfileManager mgr, String name) throws Exception { - /* - * FIXME String fileName = mgr.getRootSaveFileName(name); java.util.List - * ext = null;//FIXME - * getMOFHelpers().restore(SystemResourceManager.getProfileFolder(name),fileName); - * // should be exactly one profile... Iterator iList = ext.iterator(); - * SystemProfile profile = (SystemProfile)iList.next(); - * mgr.initialize(profile, name); return profile; - */ - return null; - } - - /** - * Save all profiles to disk - */ - public boolean commit(ISystemProfileManager profileManager) { - - ISystemProfile[] profiles = profileManager.getSystemProfiles(); - for (int idx = 0; idx < profiles.length; idx++) { - try { - commit(profiles[idx]); - } catch (Exception exc) { - exc.printStackTrace(); - System.out.println("Error saving profile " + profiles[idx] + ": " + exc.getClass().getName() + " " + exc.getMessage()); - return false; - } - } - - return true; - } - - public boolean restore(ISystemHostPool connectionPool) { - return false; - } - - /** - * Restore a connection of a given name from disk... - */ - protected IHost restoreHost(ISystemHostPool hostPool, String connectionName) throws Exception { - /* - * FIXME //System.out.println("in SystemConnectionPoolImpl#restore for - * connection " + connectionName); String fileName = - * getRootSaveFileName(connectionName); - * //System.out.println(".......fileName = " + fileName); - * //System.out.println(".......folderName = " + - * getConnectionFolder(connectionName).getName()); java.util.List ext = - * getMOFHelpers().restore(getConnectionFolder(connectionName),fileName); - * // should be exactly one profile... Iterator iList = ext.iterator(); - * SystemConnection connection = (SystemConnection)iList.next(); if - * (connection != null) { if - * (!connection.getAliasName().equalsIgnoreCase(connectionName)) { - * RSEUIPlugin.logDebugMessage(this.getClass().getName(),"Incorrect - * alias name found in connections.xmi file for " + connectionName+". - * Name was reset"); connection.setAliasName(connectionName); // just in - * case! } internalAddConnection(connection); } return connection; - */ - return null; - } - - public boolean commit(ISystemHostPool connectionPool) { - if (connectionPool.isDirty()) { - commit(connectionPool.getSystemProfile()); - connectionPool.setDirty(false); - } - /* - Host[] connections = connectionPool.getHosts(); - for (int idx = 0; idx < connections.length; idx++) - { - if (!saveHost(connectionPool, connections[idx])) - { - return false; - } - } - return true; - */ - return false; // all persistence should be at profile level - } - - public boolean commit(ISystemFilterPoolManager filterPoolManager) { - if (filterPoolManager.isDirty()) { - commit(filterPoolManager.getSystemProfile()); - filterPoolManager.setDirty(false); - } - return false; - } - - public boolean commit(ISystemFilterPool filterPool) { - if (filterPool.isDirty()) { - commit(filterPool.getSystemFilterPoolManager().getSystemProfile()); - filterPool.setDirty(false); - } - return false; - } - - public boolean restore(ISystemFilterPool filterPool) { - //System.out.println("restore filterpool"); - // DWD function Is this method really needed? - return false; - } - - public boolean commit(ISystemFilter filter) { - // System.out.println("commit filter"); - // DWD function Is this method really needed? - /* - if (filter.isDirty()) - { - System.out.println("saving filter: "+filter.getName()); - filter.setDirty(false); - } - */ - /* FIXME - //initMOF(); assume caller did this! - String fileName = getRootSaveFileName(this); - IFolder folder = getFolder(this); - getMOFHelpers().save(folder,fileName, this); - */ - return false; - } - - public ISystemFilterPool restoreFilterPool(String name) { - //System.out.println("restore filter pool "+name); - // DWD function is this method really needed? - return null; - } - - public boolean commit(ISubSystem subSystem) { - - if (subSystem.isDirty()) { - // System.out.println("updated " + subSystem.getName()); - try { - // commit everything for now - ISystemProfileManager mgr = RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager(); - commit(mgr); - subSystem.setDirty(false); - } catch (Exception e) { - e.printStackTrace(); - } - return true; - } - - /* - // FIXME - if (subSystem.isDirty()) - { - System.out.println("saving subsystem: "+subSystem.getName()); - } - */ - return false; - } - - /** - * Restore the filter pools from disk. - * @param logger The logging object to log errors to - * @param mgrFolder folder containing filter pool folders, or single file for that save policy - * @param name the name of the manager to restore. File name is derived from it when saving to one file. - * @param savePolicy How to persist filters. See SystemFilterConstants. - * @param namingPolicy Naming prefix information for persisted data file names. - * @return the restored manager, or null if it does not exist. If anything else went - * wrong, an exception is thrown. - */ - public ISystemFilterPoolManager restoreFilterPoolManager(ISystemProfile profile, Logger logger, ISystemFilterPoolManagerProvider caller, String name) { - ISystemFilterPoolManager mgr = SystemFilterPoolManager.createManager(profile); - ((SystemFilterPoolManager) mgr).initialize(logger, caller, name); // core data - mgr.setWasRestored(false); // DWD let's try this - return mgr; - } - - /** - * Attempt to save single profile to disk. - */ - public boolean commit(ISystemProfile profile) { - if (profile != null) { - return save(profile, false); - } - return false; - } - - public boolean commit(IHost host) { - return commit(host.getSystemProfile()); - } - - /** - * Loads and restores RSE artifacts from the last session - * @param profileManager - * @return true if the profiles are loaded - */ - private boolean load(ISystemProfileManager profileManager) { - boolean successful = true; - if (isExporting() || isImporting()) { - successful = false; - } else { - _currentState = STATE_IMPORTING; - IProject project = SystemResourceManager.getRemoteSystemsProject(); - try { - if (!project.isSynchronized(IResource.DEPTH_ONE)) project.refreshLocal(IResource.DEPTH_ONE, null); - IRSEPersistenceProvider persistenceProvider = getRSEPersistenceProvider(); - String profileNames[] = persistenceProvider.getSavedProfileNames(); - for (int i = 0; i < profileNames.length; i++) { - String profileName = profileNames[i]; - RSEDOM dom = importRSEDOM(profileName); - if (dom != null) { - ISystemProfile restoredProfile = _importer.restoreProfile(profileManager, dom); - if (restoredProfile == null) { - successful = false; - } - } else { - successful = false; - } - } - } catch (Exception e) { - e.printStackTrace(); - } - _currentState = STATE_NONE; - } - return successful; - } - - /** - * Writes the RSE model to a DOM and schedules writing of that DOM to disk. - * May, in fact, update an existing DOM instead of creating a new one. - * If in the process of importing, skip writing. - * @return true if the profile is written to a DOM - */ - private boolean save(ISystemProfile profile, boolean force) { - boolean result = false; - if (!isImporting()) { - _currentState = STATE_EXPORTING; - RSEDOM dom = exportRSEDOM(profile, true); // DWD should do merge, but does not handle deletes properly yet - _currentState = STATE_NONE; - result = true; - if (dom.needsSave()) { - Job job = dom.getSaveJob(); - if (job == null) { - job = new SaveRSEDOMJob(dom, getRSEPersistenceProvider()); - dom.setSaveJob(job); - } - job.schedule(3000); // five second delay - } - } - return result; - } - - public boolean isExporting() { - return _currentState == STATE_EXPORTING; - } - - public boolean isImporting() { - return _currentState == STATE_IMPORTING; - } - -// public void setState(int state) { -// _currentState = state; -// } - - private RSEDOM exportRSEDOM(ISystemProfile profile, boolean force) { - RSEDOM dom = _exporter.createRSEDOM(profile, force); - return dom; - } - - private RSEDOM importRSEDOM(String domName) { - RSEDOM dom = null; - IRSEPersistenceProvider provider = getRSEPersistenceProvider(); - if (provider != null) { - dom = provider.loadRSEDOM(domName, null); - } else { - Logger logger = RSECorePlugin.getDefault().getLogger(); - logger.logError("Persistence provider is not available.", null); // DWD NLS - } - return dom; - } - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/SaveRSEDOMJob.java b/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/SaveRSEDOMJob.java deleted file mode 100644 index 1dadad5e11e..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/SaveRSEDOMJob.java +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.internal.persistence; - -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.rse.persistence.IRSEPersistenceProvider; -import org.eclipse.rse.persistence.dom.RSEDOM; - -public class SaveRSEDOMJob extends Job { - - private RSEDOM _dom; - private IRSEPersistenceProvider _provider; - - public SaveRSEDOMJob(RSEDOM dom, IRSEPersistenceProvider provider) { - super("Saving RSE Profile: " + dom.getName()); - _dom = dom; - _provider = provider; - } - - protected IStatus run(IProgressMonitor monitor) { - IStatus result = Status.OK_STATUS; - synchronized (_dom) { // synchronize on the DOM to prevent its update while writing - if (_dom.needsSave()) { - _provider.saveRSEDOM(_dom, monitor); - _dom.markUpdated(); - } else { - result = Status.CANCEL_STATUS; - } - } - return result; - } - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/SerializingProvider.java b/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/SerializingProvider.java deleted file mode 100644 index ebe0903b57e..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/SerializingProvider.java +++ /dev/null @@ -1,180 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.internal.persistence; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.InputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.OutputStream; -import java.util.List; -import java.util.Vector; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IFolder; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.rse.core.SystemResourceManager; -import org.eclipse.rse.persistence.IRSEPersistenceProvider; -import org.eclipse.rse.persistence.dom.RSEDOM; - - -/** - * This is class is used to restore an RSE DOM from disk and import it into RSE. - * @author dmcknigh - * - */ -public class SerializingProvider implements IRSEPersistenceProvider -{ - - /* (non-Javadoc) - * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#getSavedProfileNames() - */ - public String[] getSavedProfileNames() { - /* - * We look for folders inside the RemoteSystemsConnections folder that contain - * a single file named folderName.rsedom. We return the array of folder names. - */ - List names = new Vector(10); - try { - IProject project = SystemResourceManager.getRemoteSystemsProject(); - IResource[] candidates = project.members(); - for (int i = 0; i < candidates.length; i++) { - IResource candidate = candidates[i]; - if (candidate.getType() == IResource.FOLDER) { - IFolder candidateFolder = (IFolder) candidate; - IResource[] children = candidateFolder.members(); - if (children.length == 1) { - IResource child = children[0]; - if (child.getType() == IResource.FILE) { - String profileName = candidateFolder.getName(); - String domFileName = profileName + ".rsedom"; //$NON-NLS-1$ - String childName = child.getName(); - if (childName.equals(domFileName)) { - names.add(profileName); - } - } - } - } - } - } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - String[] result = new String[names.size()]; - names.toArray(result); - return result; - } - - /** - * Restores a system profile in RSE. This API will likely change. - * - * @param profileManager - * @param profileFile the file representing the profile - * @return - */ - public RSEDOM loadRSEDOM(String profileName, IProgressMonitor monitor) - { - RSEDOM dom = null; - IFile profileFile = getProfileFile(profileName, monitor); - if (profileFile.exists()) - { - //System.out.println("loading "+ profileFile.getLocation().toOSString() + "..."); // DWD debugging - try - { - InputStream iStream = profileFile.getContents(); - - ObjectInputStream inStream = new ObjectInputStream(iStream); - dom = (RSEDOM)inStream.readObject(); - inStream.close(); - } - catch (Exception e) - { - e.printStackTrace(); - try - { - profileFile.delete(true, false, monitor); - } - catch (Exception e2) - { - e.printStackTrace(); - } - - } - } - return dom; - } - - private IFile getProfileFile(String domName, IProgressMonitor monitor) - { - IProject project = SystemResourceManager.getRemoteSystemsProject(); - - // before loading, make sure the project is in synch - try - { - project.refreshLocal(IResource.DEPTH_INFINITE, monitor); - } - catch (Exception e) - { - } - - IFolder folder = project.getFolder(domName); - if (!folder.exists()) - { - try - { - folder.create(true, true, monitor); - } - catch (Exception e) - { - } - } - return folder.getFile(domName + ".rsedom"); - } - - /** - * Saves an RSE dom to disk. This API will likely change. - * @param dom - * @param profileFile - * @return true if succcessful - */ - public boolean saveRSEDOM(RSEDOM dom, IProgressMonitor monitor) - { - - IFile profileFile = getProfileFile(dom.getName(), monitor); - File osFile = profileFile.getLocation().toFile(); - // System.out.println("saving "+ osFile.getAbsolutePath() + "..."); // DWD debugging - try - { - OutputStream oStream = new FileOutputStream(osFile); - ObjectOutputStream outStream = new ObjectOutputStream(oStream); - outStream.writeObject(dom); - outStream.close(); - profileFile.getParent().refreshLocal(IResource.DEPTH_ONE, monitor); - } - catch (Exception e) - { - e.printStackTrace(); - return false; - } - - return true; - } -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMExporter.java b/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMExporter.java deleted file mode 100644 index 77e9b45bd1e..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMExporter.java +++ /dev/null @@ -1,440 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.internal.persistence.dom; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.eclipse.rse.core.model.IPropertySet; -import org.eclipse.rse.core.model.IPropertyType; -import org.eclipse.rse.core.model.IRSEModelObject; -import org.eclipse.rse.core.subsystems.IConnectorService; -import org.eclipse.rse.core.subsystems.IServerLauncherProperties; -import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolReference; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; -import org.eclipse.rse.filters.ISystemFilterString; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemProfile; -import org.eclipse.rse.persistence.dom.IRSEDOMConstants; -import org.eclipse.rse.persistence.dom.IRSEDOMExporter; -import org.eclipse.rse.persistence.dom.RSEDOM; -import org.eclipse.rse.persistence.dom.RSEDOMNode; - -public class RSEDOMExporter implements IRSEDOMExporter { - private static RSEDOMExporter _instance = new RSEDOMExporter(); - private Map _domMap; - - /** - * Constructor to create a new DOM exporter. - */ - protected RSEDOMExporter() { - _domMap = new HashMap(); - } - - /** - * @return the singleton instance of this exporter - */ - public static RSEDOMExporter getInstance() { - return _instance; - } - - /** - * Returns the RSEDOM for this profile if it exists - * @param profile the profile for which to get the DOM - * @return the DOM for a particular profile, null if the DOM does not exist - */ - public RSEDOM getRSEDOM(ISystemProfile profile) { - return (RSEDOM) _domMap.get(profile); - } - - /** - * Creates the RSE DOM for this profile. After it has found the DOM it will - * synchronize on the DOM to ensure its integrity while it is being updated. - * @param profile the profile for which to create the DOM - * @param clean indicates whether to create from scratch or merge with existing DOM - * @return The DOM for this profile - */ - public RSEDOM createRSEDOM(ISystemProfile profile, boolean clean) { - RSEDOM dom = getRSEDOM(profile); - if (dom == null) { - dom = new RSEDOM(profile); - _domMap.put(profile, dom); - clean = true; - } - synchronized (dom) { - populateRSEDOM(dom, profile, clean); - } - return dom; - } - - /** - * Creates an RSE DOM for use in persistence - * @param dom the root node for the target DOM - * @param profile the profile from which to populate the DOM - * @param clean indicates whether to create from scratch or merge with existing DOM - * @return The DOM, updated with the data from the profile - */ - public RSEDOM populateRSEDOM(RSEDOM dom, ISystemProfile profile, boolean clean) { - // for now we do complete refresh - // clean dom for fresh creation - if (clean) { - dom.clearChildren(); - } - - if (clean || profile.isDirty() || dom.isDirty()) { - dom.clearAttributes(); - dom.addAttribute(IRSEDOMConstants.ATTRIBUTE_DEFAULT_PRIVATE, getBooleanString(profile.isDefaultPrivate())); - dom.addAttribute(IRSEDOMConstants.ATTRIBUTE_IS_ACTIVE, getBooleanString(profile.isActive())); - } - - // create the dom using the profile - - // create filter pool nodes - ISystemFilterPool[] filterPools = profile.getFilterPools(); - for (int i = 0; i < filterPools.length; i++) { - ISystemFilterPool pool = filterPools[i]; - createNode(dom, pool, clean); - } - - // create hosts nodes - - // old nodes to compare with - RSEDOMNode[] oldHostNodes = null; - if (!clean) { - oldHostNodes = dom.getChildren(IRSEDOMConstants.TYPE_HOST); - } - - List missingNodes = new ArrayList(); - if (!clean) { - for (int o = 0; o < oldHostNodes.length; o++) { - missingNodes.add(oldHostNodes[o]); - } - } - - IHost[] hosts = profile.getHosts(); - for (int j = 0; j < hosts.length; j++) { - IHost host = hosts[j]; - RSEDOMNode hnode = createNode(dom, host, clean); - - if (!clean) { - // remove this one from the missing list - missingNodes.remove(hnode); - } - } - - if (!clean) { - // remaining missingNodes are probably deleted now - for (int x = 0; x < missingNodes.size(); x++) { - dom.removeChild((RSEDOMNode) missingNodes.get(x)); - } - } - - // create generic property set nodes - createPropertySetNodes(dom, profile, clean); - dom.setDirty(false); - - return dom; - } - - /** - * Creates DOM nodes for each associated property set - * @param parent The node of the DOM that needs a property set - * @param modelObject the RSE model object that has the property set. - * @param clean true if we are creating, false if we are merging - * @return an array of DOM nodes - each one being a property set - */ - public RSEDOMNode[] createPropertySetNodes(RSEDOMNode parent, IRSEModelObject modelObject, boolean clean) { - IPropertySet[] propertySets = modelObject.getPropertySets(); - for (int i = 0; i < propertySets.length; i++) { - IPropertySet set = propertySets[i]; - RSEDOMNode node = new RSEDOMNode(parent, IRSEDOMConstants.TYPE_PROPERTY_SET, set.getName()); - String[] keys = set.getPropertyKeys(); - for (int k = 0; k < keys.length; k++) { - String key = keys[k]; - String value = set.getPropertyValue(key); - IPropertyType type = set.getPropertyType(key); - node.addAttribute(key, value, type.toString()); - } - } - return parent.getChildren(); - } - - /** - * Create a DOM node representing a filter pool - * @param parent the parent DOM node - * @param filterPool the filter pool from which to create a DOM node linked to this parent - * @param clean true if we are creating, false if we are merging - * @return the DOM node representing the filter pool - */ - public RSEDOMNode createNode(RSEDOMNode parent, ISystemFilterPool filterPool, boolean clean) { - RSEDOMNode node = findOrCreateNode(parent, IRSEDOMConstants.TYPE_FILTER_POOL, filterPool, clean); - if (clean || node.isDirty()) { - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE, filterPool.getType()); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_ID, filterPool.getId()); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_SUPPORTS_NESTED_FILTERS, getBooleanString(filterPool.supportsNestedFilters())); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_DELETABLE, getBooleanString(filterPool.isDeletable())); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_DEFAULT, getBooleanString(filterPool.isDefault())); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_STRING_CASE_SENSITIVE, getBooleanString(filterPool.isSetStringsCaseSensitive())); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_SUPPORTS_DUPLICATE_FILTER_STRINGS, getBooleanString(filterPool.supportsDuplicateFilterStrings())); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_RELEASE, "" + filterPool.getRelease()); //$NON-NLS-1$ - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_SINGLE_FILTER_STRING_ONLY, getBooleanString(filterPool.isSetSingleFilterStringOnly())); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_OWNING_PARENT_NAME, filterPool.getOwningParentName()); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_NON_RENAMABLE, getBooleanString(filterPool.isNonRenamable())); - } - ISystemFilter[] filters = filterPool.getSystemFilters(); - for (int i = 0; i < filters.length; i++) { - createNode(node, filters[i], clean); - } - createPropertySetNodes(node, filterPool, clean); - node.setDirty(false); - return node; - } - - /** - * Creates a DOM node for a filter - * @param parent The parent DOM node for this filter, usually a DOM node for a filter pool - * @param filter the filter for which to create a new node - * @param clean true if we are creating, false if we are merging - * @return the DOM node representing the filter - */ - public RSEDOMNode createNode(RSEDOMNode parent, ISystemFilter filter, boolean clean) { - RSEDOMNode node = findOrCreateNode(parent, IRSEDOMConstants.TYPE_FILTER, filter, clean); - if (clean || node.isDirty()) { - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_ID, filter.getName()); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_SUPPORTS_NESTED_FILTERS, getBooleanString(filter.isSupportsNestedFilters())); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_RELATIVE_ORDER, "" + filter.getRelativeOrder()); //$NON-NLS-1$ - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_DEFAULT, getBooleanString(filter.isDefault())); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_STRING_CASE_SENSITIVE, getBooleanString(filter.isSetStringsCaseSensitive())); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_PROMPTABLE, getBooleanString(filter.isPromptable())); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_SUPPORTS_DUPLICATE_FILTER_STRINGS, getBooleanString(filter.supportsDuplicateFilterStrings())); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_NON_DELETABLE, getBooleanString(filter.isNonDeletable())); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_NON_RENAMABLE, getBooleanString(filter.isNonRenamable())); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_NON_CHANGEABLE, getBooleanString(filter.isNonChangable())); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_STRINGS_NON_CHANGABLE, getBooleanString(filter.isStringsNonChangable())); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_RELEASE, "" + filter.getRelease()); //$NON-NLS-1$ - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_SINGLE_FILTER_STRING_ONLY, getBooleanString(filter.isSetSingleFilterStringOnly())); - } - - // add nested filters - ISystemFilter[] nestedFilters = filter.getSystemFilters(); - for (int i = 0; i < nestedFilters.length; i++) { - createNode(node, nestedFilters[i], clean); - } - - // add filter strings - ISystemFilterString[] filterStrings = filter.getSystemFilterStrings(); - for (int j = 0; j < filterStrings.length; j++) { - createNode(node, filterStrings[j], clean); - } - - createPropertySetNodes(node, filter, clean); - node.setDirty(false); - return node; - } - - /** - * Creates a DOM node for a filter string - * @param parent the DOM node that is the parent to this filter string. This should be a node for a filter. - * @param filterString The filter string for which the node will be created - * @param clean true if we are creating, false if we are merging - * @return the DOM node for the filter string - */ - public RSEDOMNode createNode(RSEDOMNode parent, ISystemFilterString filterString, boolean clean) { - RSEDOMNode node = findOrCreateNode(parent, IRSEDOMConstants.TYPE_FILTER_STRING, filterString, clean); - - if (clean || node.isDirty()) { - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_STRING, filterString.getString()); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE, filterString.getType()); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_DEFAULT, getBooleanString(filterString.isDefault())); - } - - createPropertySetNodes(node, filterString, clean); - return node; - } - - /** - * Create a DOM node representing a host - * @param parent The DOM node that is the parent to this host, usually a node representing a profile - * @param host The host for which to create the DOM node - * @param clean true if we are creating, false if we are merging - * @return the DOM node for the host - */ - public RSEDOMNode createNode(RSEDOMNode parent, IHost host, boolean clean) { - RSEDOMNode node = findOrCreateNode(parent, IRSEDOMConstants.TYPE_HOST, host, clean); - - if (clean || node.isDirty()) { - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE, host.getSystemType()); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_OFFLINE, getBooleanString(host.isOffline())); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_PROMPTABLE, getBooleanString(host.isPromptable())); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_HOSTNAME, host.getHostName()); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_DESCRIPTION, host.getDescription()); - } - - IConnectorService[] connectorServices = host.getConnectorServices(); - for (int i = 0; i < connectorServices.length; i++) { - IConnectorService service = connectorServices[i]; - createNode(node, service, clean); - } - - createPropertySetNodes(node, host, clean); - node.setDirty(false); - return node; - } - - /** - * Creates a DOM node for a connector service - * @param parent the DOM node representing the parent for a connector service. This should be a Host - * @param connectorService the connector service for which a DOM node is to be created - * @param clean true if we are creating, false if we are merging - * @return the DOM node for the connector service - */ - public RSEDOMNode createNode(RSEDOMNode parent, IConnectorService connectorService, boolean clean) { - RSEDOMNode node = findOrCreateNode(parent, IRSEDOMConstants.TYPE_CONNECTOR_SERVICE, connectorService, clean); - if (clean || node.isDirty()) { - // store it's attributes - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE, connectorService.getHostType()); - - // can't do this til connector service owns the properties (right now it's still subsystem) - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_GROUP, connectorService.getName()); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_USE_SSL, getBooleanString(connectorService.isUsingSSL())); - } - // store the server launcher - // right now subsystem still owns the server launchers - // that will change later - - IServerLauncherProperties serverLauncher = connectorService.getRemoteServerLauncherProperties(); - if (serverLauncher != null) { - createNode(node, serverLauncher, clean); - } - - // store each subsystem - ISubSystem[] subSystems = connectorService.getSubSystems(); - for (int i = 0; i < subSystems.length; i++) { - createNode(node, subSystems[i], clean); - } - - createPropertySetNodes(node, connectorService, clean); - node.setDirty(false); - return node; - } - - /** - * Creates a DOM node for a server launcher - * @param parent the DOM node represnting a parent for a server launcher, usually a connector service - * @param serverLauncher the server launcher from which to create the node - * @param clean true if we are creating, false if we are merging - * @return the node representing the server launcher - */ - public RSEDOMNode createNode(RSEDOMNode parent, IServerLauncherProperties serverLauncher, boolean clean) { - RSEDOMNode node = findOrCreateNode(parent, IRSEDOMConstants.TYPE_SERVER_LAUNCHER, serverLauncher, clean); - - if (clean || node.isDirty()) { - } - - serverLauncher.saveToProperties(); - createPropertySetNodes(node, serverLauncher, clean); - return node; - } - - /** - * Creates a DOM node for a subsystem - * @param parent the DOM node representing the parent for this subsystem, usually a connector service - * @param subSystem the subsystem from which to create the DOM node - * @param clean true if we are creating, false if we are merging - * @return the DOM node representing the subsystem - */ - public RSEDOMNode createNode(RSEDOMNode parent, ISubSystem subSystem, boolean clean) { - RSEDOMNode node = findOrCreateNode(parent, IRSEDOMConstants.TYPE_SUBSYSTEM, subSystem, clean); - - if (clean || node.isDirty()) { - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_HIDDEN, getBooleanString(subSystem.isHidden())); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE, subSystem.getSubSystemConfiguration().getId()); - } - - // create filter pool reference nodes - ISystemFilterPoolReferenceManager refMgr = subSystem.getFilterPoolReferenceManager(); - if (refMgr != null) { - ISystemFilterPoolReference[] references = refMgr.getSystemFilterPoolReferences(); - for (int i = 0; i < references.length; i++) { - ISystemFilterPoolReference ref = references[i]; - createNode(node, ref, clean); - } - } - - createPropertySetNodes(node, subSystem, clean); - node.setDirty(false); - return node; - } - - /** - * Creates a DOM node for a filter pool reference - * @param parent the DOM node representing the parent for a filter pool reference, usually a subsystem - * @param filterPoolReference the reference from which to create a new DOM node - * @param clean true if we are creating, false if we are merging - * @return the DOM node created for the filter pool reference - */ - public RSEDOMNode createNode(RSEDOMNode parent, ISystemFilterPoolReference filterPoolReference, boolean clean) { - RSEDOMNode node = findOrCreateNode(parent, IRSEDOMConstants.TYPE_FILTER_POOL_REFERENCE, filterPoolReference, clean); - - if (clean || node.isDirty()) { - ISystemFilterPool filterPool = filterPoolReference.getReferencedFilterPool(); - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_REF_ID, filterPool.getId()); - } - - createPropertySetNodes(node, filterPoolReference, clean); - node.setDirty(false); - return node; - } - - /** - * @param parent the DOM node representing the parent of the node we are trying to find - * @param type the type of the DOM node to look for - * @param modelObject the model object for which we are trying to find a matching node - * @param clean true if we are creating, false if we are merging - * @return the DOM node that we found or created - */ - private RSEDOMNode findOrCreateNode(RSEDOMNode parent, String type, IRSEModelObject modelObject, boolean clean) { - RSEDOMNode node = null; - String name = modelObject.getName(); - if (!clean) { - node = parent.getChild(type, name); - if (node != null && modelObject.isDirty()) { - node.clearAttributes(); - node.setDirty(true); - } - } - boolean newNode = (node == null); - if (newNode) { - node = new RSEDOMNode(parent, type, name); - } - return node; - } - - /** - * Helper to get either "true" or "false" based on boolean flag - * @param flag the flag which to translate - * @return a string value suitable for the DOM - */ - private String getBooleanString(boolean flag) { - return flag ? IRSEDOMConstants.ATTRIBUTE_TRUE : IRSEDOMConstants.ATTRIBUTE_FALSE; - } -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java b/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java deleted file mode 100644 index 0e1b28bf076..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java +++ /dev/null @@ -1,549 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.internal.persistence.dom; - -import java.util.Vector; - -import org.eclipse.rse.core.internal.subsystems.SubSystemFilterNamingPolicy; -import org.eclipse.rse.core.model.IPropertySet; -import org.eclipse.rse.core.model.IPropertyType; -import org.eclipse.rse.core.model.IRSEModelObject; -import org.eclipse.rse.core.model.PropertyType; -import org.eclipse.rse.core.servicesubsystem.IServiceSubSystem; -import org.eclipse.rse.core.servicesubsystem.IServiceSubSystemConfiguration; -import org.eclipse.rse.core.subsystems.IConnectorService; -import org.eclipse.rse.core.subsystems.IServerLauncherProperties; -import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterConstants; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolReference; -import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; -import org.eclipse.rse.filters.ISystemFilterString; -import org.eclipse.rse.filters.SystemFilterStartHere; -import org.eclipse.rse.internal.filters.SystemFilterPool; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemProfile; -import org.eclipse.rse.model.ISystemProfileManager; -import org.eclipse.rse.persistence.dom.IRSEDOMConstants; -import org.eclipse.rse.persistence.dom.IRSEDOMImporter; -import org.eclipse.rse.persistence.dom.RSEDOM; -import org.eclipse.rse.persistence.dom.RSEDOMNode; -import org.eclipse.rse.persistence.dom.RSEDOMNodeAttribute; -import org.eclipse.rse.ui.RSEUIPlugin; - - -public class RSEDOMImporter implements IRSEDOMImporter -{ - private static RSEDOMImporter _instance = new RSEDOMImporter(); - - - public static RSEDOMImporter getInstance() - { - return _instance; - } - - public RSEDOMImporter() - { - } - - - /** - * Restores the profile represented by dom - * @param profileManager - * @param dom - * @return the restored profile - */ - public ISystemProfile restoreProfile(ISystemProfileManager profileManager, RSEDOM dom) - { - // create the profile - String profileName = dom.getName(); - boolean defaultPrivate = getBooleanValue(dom.getAttribute(IRSEDOMConstants.ATTRIBUTE_DEFAULT_PRIVATE).getValue()); - boolean isActive = getBooleanValue(dom.getAttribute(IRSEDOMConstants.ATTRIBUTE_IS_ACTIVE).getValue()); - ISystemProfile profile = profileManager.createSystemProfile(profileName, isActive); - - - if (profile != null) - { - profile.setDefaultPrivate(defaultPrivate); - profileManager.makeSystemProfileActive(profile, isActive); - // restore the children for the profile - RSEDOMNode[] children = dom.getChildren(); - for (int i = 0;i < children.length; i++) - { - RSEDOMNode child = children[i]; - String type = child.getType(); - if (type.equals(IRSEDOMConstants.TYPE_HOST)) - { - restoreHost(profile, child); - } - else if (type.equals(IRSEDOMConstants.TYPE_FILTER_POOL)) - { - restoreFilterPool(profile, child); - } - else if (type.equals(IRSEDOMConstants.TYPE_PROPERTY_SET)) - { - restorePropertySet(profile, child); - } - } - } - return profile; - } - - /** - * Restores the host represented by hostNode - */ - public IHost restoreHost(ISystemProfile profile, RSEDOMNode hostNode) - { - IHost host = null; - - // get host node attributes - String connectionName = hostNode.getName(); - String systemType = hostNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE).getValue(); - String hostName = hostNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_HOSTNAME).getValue(); - String description = hostNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_DESCRIPTION).getValue(); - boolean isOffline = getBooleanValue(hostNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_OFFLINE).getValue()); - boolean isPromptable = getBooleanValue(hostNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_PROMPTABLE).getValue()); - - // create host and set it's attributes - try - { - // NOTE create host effectively recreates the subsystems - // so instead of creating subsystems on restore, we should be updating their properties - host = profile.createHost(systemType, connectionName, hostName, description); - host.setOffline(isOffline); - host.setPromptable(isPromptable); - } - catch (Exception e) - { - e.printStackTrace(); - } - - // restore children of host - RSEDOMNode[] children = hostNode.getChildren(); - for (int i = 0;i < children.length; i++) - { - RSEDOMNode child = children[i]; - String type = child.getType(); - if (type.equals(IRSEDOMConstants.TYPE_CONNECTOR_SERVICE)) - { - restoreConnectorService(host, child); - } - else if (type.equals(IRSEDOMConstants.TYPE_PROPERTY_SET)) - { - restorePropertySet(profile, child); - } - } - - return host; - } - - /** - * Restore the connector service represented by connectorServiceNode - */ - public IConnectorService restoreConnectorService(IHost host, RSEDOMNode connectorServiceNode) - { - // TODO - this should come before subsystems - // but currently we're still using old way of creating subsystem first - IConnectorService service = null; - - // get attributes of the service -// String name = connectorServiceNode.getName(); -// String type = connectorServiceNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE).getValue(); -// String group = connectorServiceNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_GROUP).getValue(); - boolean useSSL = getBooleanValue(connectorServiceNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_USE_SSL).getValue()); - - // first restore subsystems (since right now we need subsystem to get at service - RSEDOMNode[] ssChildren = connectorServiceNode.getChildren(IRSEDOMConstants.TYPE_SUBSYSTEM); - for (int s = 0; s < ssChildren.length; s++) - { - RSEDOMNode ssChild = ssChildren[s]; - ISubSystem subSystem = restoreSubSystem(host, ssChild); - if (subSystem != null && service == null) - { - ISubSystemConfiguration factory = subSystem.getSubSystemConfiguration(); - service = factory.getConnectorService(host); - if (service != null) - { - if (factory.supportsServerLaunchProperties(host)) - { - IServerLauncherProperties sl = factory.createServerLauncher(service); - if (sl != null) - { - // get server launcher properties - // right now we just set them for subsystem, but later that will change - RSEDOMNode serverLauncherPropertiesNode = null; - RSEDOMNode[] slChildren = connectorServiceNode.getChildren(IRSEDOMConstants.TYPE_SERVER_LAUNCHER); - if (slChildren != null && slChildren.length > 0) - { - serverLauncherPropertiesNode = slChildren[0]; - restoreServerLauncher(service, serverLauncherPropertiesNode, sl); - } - } - } - - service.setIsUsingSSL(useSSL); - } - } - if (service != null && subSystem != null) - { - subSystem.setConnectorService(service); - } - } - - - - // restore all property sets - RSEDOMNode[] psChildren = connectorServiceNode.getChildren(IRSEDOMConstants.TYPE_PROPERTY_SET); - for (int p = 0;p < psChildren.length; p++) - { - RSEDOMNode psChild = psChildren[p]; - restorePropertySet(service, psChild); - } - return service; - } - - public IServerLauncherProperties restoreServerLauncher(IConnectorService service, RSEDOMNode serverLauncherNode, IServerLauncherProperties sl) - { -// restore all property sets - RSEDOMNode[] psChildren = serverLauncherNode.getChildren(IRSEDOMConstants.TYPE_PROPERTY_SET); - for (int p = 0;p < psChildren.length; p++) - { - RSEDOMNode psChild = psChildren[p]; - restorePropertySet(sl, psChild); - } - sl.restoreFromProperties(); - service.setRemoteServerLauncherProperties(sl); - return sl; - } - - /** - * Restores the subsystem represented by subSystemNode - */ - public ISubSystem restoreSubSystem(IHost host, RSEDOMNode subSystemNode) - { - // in most cases (if not all) the subsystem already exists - // since createHost() ends up recreating subsystems for each factory - String name = subSystemNode.getName(); - String type = subSystemNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE).getValue(); - boolean isHidden = getBooleanValue(subSystemNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_HIDDEN).getValue()); - ISubSystem subSystem = null; - ISubSystemConfiguration factory = getSubSystemConfiguration(type); - if (factory != null) - { - if (factory instanceof IServiceSubSystemConfiguration) - { - IServiceSubSystemConfiguration serviceFactory = (IServiceSubSystemConfiguration)factory; - ISubSystem[] existingSubSystems = RSEUIPlugin.getTheSystemRegistry().getServiceSubSystems(serviceFactory.getServiceType(), host); - if (existingSubSystems != null && existingSubSystems.length > 0) - { - subSystem = existingSubSystems[0]; - // need to switch factories - ((IServiceSubSystem)subSystem).switchServiceFactory(serviceFactory); - } - } - else - { - ISubSystem[] existingSubSystems = RSEUIPlugin.getTheSystemRegistry().getSubSystems(type, host); - - if (existingSubSystems != null && existingSubSystems.length > 0) - { - subSystem = existingSubSystems[0]; - } - } - - if (subSystem == null) - { - subSystem = factory.createSubSystemInternal(host); - } - subSystem.setHidden(isHidden); - subSystem.setHost(host); - subSystem.setSubSystemConfiguration(factory); - subSystem.setName(factory.getName()); - subSystem.setConfigurationId(factory.getId()); - subSystem.setWasRestored(true); - - if (factory.supportsFilters()) - { - ISystemFilterPoolReferenceManager fprMgr = SystemFilterStartHere.createSystemFilterPoolReferenceManager(subSystem, factory, name, new SubSystemFilterNamingPolicy()); - subSystem.setFilterPoolReferenceManager(fprMgr); - ISystemFilterPoolManager defaultFilterPoolManager = factory.getFilterPoolManager(host.getSystemProfile()); - fprMgr.setDefaultSystemFilterPoolManager(defaultFilterPoolManager); - } - - - - // restore filer pool references - RSEDOMNode[] filterPoolReferenceChildren = subSystemNode.getChildren(IRSEDOMConstants.TYPE_FILTER_POOL_REFERENCE); - for (int i = 0; i < filterPoolReferenceChildren.length; i++) - { - RSEDOMNode fprChild = filterPoolReferenceChildren[i]; - restoreFilterPoolReference(subSystem, fprChild); - } - - // restore all property sets - RSEDOMNode[] psChildren = subSystemNode.getChildren(IRSEDOMConstants.TYPE_PROPERTY_SET); - for (int p = 0;p < psChildren.length; p++) - { - RSEDOMNode psChild = psChildren[p]; - restorePropertySet(subSystem, psChild); - } - } - return subSystem; - } - - /** - * Restore the filter - */ - public ISystemFilter restoreFilter(ISystemFilterPool filterPool, RSEDOMNode node) - { - // get the node attributes for a filter - String name = node.getName(); - boolean supportsNestedFilters = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_SUPPORTS_NESTED_FILTERS).getValue()); - int relativeOrder = getIntegerValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_RELATIVE_ORDER).getValue()); - boolean isDefault = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_DEFAULT).getValue()); - boolean isSetStringsCaseSensitive = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_STRING_CASE_SENSITIVE).getValue()); - boolean isPromptable = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_PROMPTABLE).getValue()); - boolean isSetSupportsDuplicateFilterStrings = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_SUPPORTS_DUPLICATE_FILTER_STRINGS).getValue()); - boolean isNonDeletable = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_NON_DELETABLE).getValue()); - boolean isNonRenamable = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_NON_RENAMABLE).getValue()); - boolean isNonChangable = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_NON_CHANGEABLE).getValue()); - boolean isStringsNonChangable = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_STRINGS_NON_CHANGABLE).getValue()); - int release = getIntegerValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_RELEASE).getValue()); - boolean isSetSingleFilterStringOnly = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_SINGLE_FILTER_STRING_ONLY).getValue()); - - Vector filterStrings = new Vector(); - - // create the filter strings - RSEDOMNode filterStringNodes[] = node.getChildren(IRSEDOMConstants.TYPE_FILTER_STRING); - for (int i = 0; i < filterStringNodes.length; i++) - { - RSEDOMNode filterStringNode = filterStringNodes[i]; - - // might not have to restore the filter strings this way - //restoreFilterString(filter, filterStringNode); - - filterStrings.add(filterStringNode.getName()); - } - - // create the filter - ISystemFilter filter = filterPool.createSystemFilter(name, filterStrings); - - filter.setWasRestored(true); - - // set filter attributes - filter.setSupportsNestedFilters(supportsNestedFilters); - filter.setRelativeOrder(relativeOrder); - filter.setDefault(isDefault); - filter.setStringsCaseSensitive(isSetStringsCaseSensitive); - filter.setPromptable(isPromptable); - filter.setSupportsDuplicateFilterStrings(isSetSupportsDuplicateFilterStrings); - filter.setNonDeletable(isNonDeletable); - filter.setNonChangable(isNonChangable); - filter.setNonRenamable(isNonRenamable); - filter.setStringsNonChangable(isStringsNonChangable); - filter.setRelease(release); - filter.setSingleFilterStringOnly(isSetSingleFilterStringOnly); - - // restore all property sets - RSEDOMNode[] psChildren = node.getChildren(IRSEDOMConstants.TYPE_PROPERTY_SET); - for (int p = 0;p < psChildren.length; p++) - { - RSEDOMNode psChild = psChildren[p]; - restorePropertySet(filter, psChild); - } - return filter; - } - - /** - * Restore the filter pool represented by the node - */ - public ISystemFilterPool restoreFilterPool(ISystemProfile profile, RSEDOMNode node) - { - ISystemFilterPool filterPool = null; - - // get the node attributes for a filter pool - String name = node.getName(); - String type = node.getAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE).getValue(); - String id = node.getAttribute(IRSEDOMConstants.ATTRIBUTE_ID).getValue(); - boolean supportsNestedFilters = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_SUPPORTS_NESTED_FILTERS).getValue()); - boolean isDeletable = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_DELETABLE).getValue()); - boolean isDefault = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_DEFAULT).getValue()); - boolean isSetStringsCaseSensitive = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_STRING_CASE_SENSITIVE).getValue()); - boolean isSetSupportsDuplicateFilterStrings = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_SUPPORTS_DUPLICATE_FILTER_STRINGS).getValue()); - int release = getIntegerValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_RELEASE).getValue()); - boolean isSetSingleFilterStringOnly = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_SINGLE_FILTER_STRING_ONLY).getValue()); - String owningParentName = node.getAttribute(IRSEDOMConstants.ATTRIBUTE_OWNING_PARENT_NAME).getValue(); - boolean isNonRenamable = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_NON_RENAMABLE).getValue()); - - // create the filter pool and set it's attributes - try - { - ISubSystemConfiguration factory = getSubSystemConfiguration(id); - if (factory != null) - { - ISystemFilterPoolManager mgr = factory.getFilterPoolManager(profile); - if (isDefault) - { - filterPool = mgr.getFirstDefaultSystemFilterPool(); - } - else - { - filterPool = mgr.getSystemFilterPool(name); - } - if (filterPool == null) - { - filterPool = SystemFilterPool.createSystemFilterPool(name, - supportsNestedFilters, - isDeletable, - ISystemFilterConstants.TRY_TO_RESTORE_NO); - - if (filterPool != null) - { - filterPool.setSystemFilterPoolManager(mgr); - // add to model - mgr.getPools().add(filterPool); - } - } - filterPool.setType(type); - filterPool.setDefault(isDefault); - filterPool.setSupportsNestedFilters(supportsNestedFilters); - filterPool.setStringsCaseSensitive(isSetStringsCaseSensitive); - filterPool.setSupportsDuplicateFilterStrings(isSetSupportsDuplicateFilterStrings); - filterPool.setRelease(release); - filterPool.setSingleFilterStringOnly(isSetSingleFilterStringOnly); - filterPool.setOwningParentName(owningParentName); - filterPool.setNonRenamable(isNonRenamable); - - filterPool.setWasRestored(true); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - - // restore children - RSEDOMNode[] children = node.getChildren(); - for (int i = 0;i < children.length; i++) - { - RSEDOMNode child = children[i]; - String ctype = child.getType(); - if (ctype.equals(IRSEDOMConstants.TYPE_FILTER)) - { - if (filterPool != null) - { - restoreFilter(filterPool, child); - } - } - else if (ctype.equals(IRSEDOMConstants.TYPE_PROPERTY_SET)) - { - restorePropertySet(filterPool, child); - } - } - return filterPool; - } - - /** - * Restore the filter pool reference that is represented by the node - */ - public ISystemFilterPoolReference restoreFilterPoolReference(ISubSystem subsystem, RSEDOMNode node) { - ISystemFilterPoolReference filterPoolReference = null; - String subsystemName = node.getAttribute(IRSEDOMConstants.ATTRIBUTE_REF_ID).getValue(); - String filterPoolName = node.getName(); - ISubSystemConfiguration configuration = getSubSystemConfiguration(subsystemName); - if (configuration != null) { - ISystemProfile profile = subsystem.getSystemProfile(); // DWD are there cases where this may be null? - ISystemFilterPoolManager filterPoolManager = configuration.getFilterPoolManager(profile); - ISystemFilterPool filterPool = filterPoolManager.getSystemFilterPool(filterPoolName); - ISystemFilterPoolReferenceManager referenceManager = subsystem.getFilterPoolReferenceManager(); - /* - * DWD filterpool can be null when restoring since there can be forward references. - * A profile may be being restored that has references to a filter pool in a profile that doesn't yet exist. - * Need to create an "unresolved" reference instead of a null object and then patch them up - * at the end. - */ - // create reference to the filterpool - if (filterPool != null) { - filterPoolReference = referenceManager.addReferenceToSystemFilterPool(filterPool); - } else { - try { - filterPoolReference = referenceManager.addReferenceToSystemFilterPool(filterPoolManager, filterPoolName); - } catch(NullPointerException e) { - //TODO Workaround for bug 153253 -- should be fixed properly - System.err.println("TODO: Fix bug 153253 - NPE reading connection-private filter pools"); - e.printStackTrace(); - } - } - } - return filterPoolReference; - } - - public ISystemFilterString restoreFilterString(ISystemFilter filter, RSEDOMNode node) - { - /* - String string = node.getAttribute(IRSEDOMConstants.ATTRIBUTE_STRING).getValue(); - String type = node.getAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE).getValue(); - boolean isDefault = getBooleanValue(node.getAttribute(IRSEDOMConstants.ATTRIBUTE_DEFAULT).getValue()); - - SystemFilterString filterString = filter - */ - return null;//not sure if we need this - } - - /** - * Restores the property set represented by propertySetNode - */ - public IPropertySet restorePropertySet(IRSEModelObject modelObject, RSEDOMNode propertySetNode) - { - String name = propertySetNode.getName(); - IPropertySet set = modelObject.createPropertySet(name); - RSEDOMNodeAttribute[] attributes = propertySetNode.getAttributes(); - for (int i = 0; i < attributes.length; i++) - { - RSEDOMNodeAttribute attribute = attributes[i]; - String typeStr = attribute.getType(); - IPropertyType type = PropertyType.fromString(typeStr); - - set.addProperty(attribute.getKey(), attribute.getValue(), type); - - } - return set; - } - - private boolean getBooleanValue(String booleanStr) - { - return ((booleanStr != null) && booleanStr.equalsIgnoreCase(IRSEDOMConstants.ATTRIBUTE_TRUE)); - } - - private int getIntegerValue(String integerString) - { - return Integer.parseInt(integerString); - } - - /** - * Returns the subsystem configuration for a given subsystem name - * @param subsystemName the name to look up - * @return the subsystem configuration matching the name - */ - private ISubSystemConfiguration getSubSystemConfiguration(String subsystemName) - { - return RSEUIPlugin.getTheSystemRegistry().getSubSystemConfiguration(subsystemName); - } -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/IRSEPersistenceManager.java b/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/IRSEPersistenceManager.java deleted file mode 100644 index d873c34202e..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/IRSEPersistenceManager.java +++ /dev/null @@ -1,119 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.persistence; - -import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.logging.Logger; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemHostPool; -import org.eclipse.rse.model.ISystemProfile; -import org.eclipse.rse.model.ISystemProfileManager; - - -public interface IRSEPersistenceManager -{ - /** - * Register the persistence provider to be used when saving and restoring RSE doms. - * The provider is registered under the provided id. - * @param id the provider id. - * @param provider the provider. - */ - public void registerRSEPersistenceProvider(String id, IRSEPersistenceProvider provider); - - /** - * Restore all profiles - * @param profileManager - * @return true if successful - */ - public boolean restore(ISystemProfileManager profileManager); - - /** - * Save all profiles - * @param profileManager - * @return true if successful - */ - public boolean commit(ISystemProfileManager profileManager); - - public boolean commit(IHost host); - - /** - * Restore all connections in the connection pool - * @param connectionPool - * @return true if successful - */ - public boolean restore(ISystemHostPool connectionPool); - - /** - * Save all connections in the connection pool - * @param connectionPool - * @return true if successful - */ - public boolean commit(ISystemHostPool connectionPool); - - public boolean commit(ISystemFilterPoolManager filterPoolManager); - /** - * Save all the filters in the filter pool - * @param filterPool - * @return true if successful - */ - public boolean commit(ISystemFilterPool filterPool); - - /** - * Save this filter - * @param filter - * @return true if successful - */ - public boolean commit(ISystemFilter filter); - - /** - * Restore all the filters for the filter pool - * @param filterPool - * @return true if sucessful - */ - public boolean restore(ISystemFilterPool filterPool); - - /** - * Restore the filter pool - * @param name - * @return the filter pool if successful - */ - public ISystemFilterPool restoreFilterPool(String name); - - - /** - * Save this subsystem - * @param subSystem - * @return true if successful - */ - public boolean commit(ISubSystem subSystem); - - /** - * Save this profile - * @param profile - * @return true if successful - */ - public boolean commit(ISystemProfile profile); - - public ISystemFilterPoolManager restoreFilterPoolManager(ISystemProfile profile, Logger logger, ISystemFilterPoolManagerProvider caller, String name); - - public boolean isExporting(); - public boolean isImporting(); -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/IRSEPersistenceProvider.java b/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/IRSEPersistenceProvider.java deleted file mode 100644 index 1b7942a854b..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/IRSEPersistenceProvider.java +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.persistence; - -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.rse.persistence.dom.RSEDOM; - - -/** - * This is the interface that needs to be implemented when providing an extension - * using the RSE persistence provider extension point. - * - * Implement this class to provide a specialized means of - * saving and restoring RSEDOM - * - */ -public interface IRSEPersistenceProvider -{ - /** - * Restores an RSE DOM given a profileName. - * - * @param profileName name of the Profile to load - * @param monitor - * @return the RSE DOM for the specified profile - */ - public RSEDOM loadRSEDOM(String profileName, IProgressMonitor monitor); - - /** - * Persists an RSE DOM. - * - * @param dom the RSE DOM to persist - * @param monitor - * @return true if succcessful - */ - public boolean saveRSEDOM(RSEDOM dom, IProgressMonitor monitor); - - /** - * @return The names of the profiles that have been saved by this persistence provider. - */ - public String[] getSavedProfileNames(); -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/dom/IRSEDOMConstants.java b/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/dom/IRSEDOMConstants.java deleted file mode 100644 index 5a99003da1a..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/dom/IRSEDOMConstants.java +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.persistence.dom; - -public interface IRSEDOMConstants -{ - // node types - public static final String TYPE_PROFILE = "Profile"; //$NON-NLS-1$ - public static final String TYPE_PROPERTY_SET = "PropertySet"; //$NON-NLS-1$ - public static final String TYPE_PROPERTY = "Property"; //$NON-NLS-1$ - public static final String TYPE_HOST = "Host"; //$NON-NLS-1$ - public static final String TYPE_FILTER_POOL = "FilterPool"; //$NON-NLS-1$ - public static final String TYPE_FILTER = "Filter"; //$NON-NLS-1$ - public static final String TYPE_FILTER_STRING = "FilterString"; //$NON-NLS-1$ - public static final String TYPE_FILTER_POOL_REFERENCE = "FilterPoolReference"; //$NON-NLS-1$ - public static final String TYPE_CONNECTOR_SERVICE = "ConnectorService"; //$NON-NLS-1$ - public static final String TYPE_SERVER_LAUNCHER = "ServerLauncher"; //$NON-NLS-1$ - public static final String TYPE_SUBSYSTEM = "SubSystem"; //$NON-NLS-1$ - - // node attributes - - // profile attributes - public static final String ATTRIBUTE_DEFAULT_PRIVATE="defaultPrivate"; //$NON-NLS-1$ - public static final String ATTRIBUTE_IS_ACTIVE="isActive"; //$NON-NLS-1$ - - // subsystem attributes - public static final String ATTRIBUTE_HIDDEN="hidden"; //$NON-NLS-1$ - - // common attributes - public static final String ATTRIBUTE_NAME="name"; //$NON-NLS-1$ - public static final String ATTRIBUTE_TYPE="type"; //$NON-NLS-1$ - - // host attributes - public static final String ATTRIBUTE_HOSTNAME = "hostname"; //$NON-NLS-1$ - public static final String ATTRIBUTE_OFFLINE = "offline"; //$NON-NLS-1$ - public static final String ATTRIBUTE_DESCRIPTION = "description"; //$NON-NLS-1$ - - // ConnectorService attributes - public static final String ATTRIBUTE_GROUP="group"; //$NON-NLS-1$ - public static final String ATTRIBUTE_USE_SSL="useSSL"; //$NON-NLS-1$ - - // Filter string attributes - public static final String ATTRIBUTE_STRING = "string"; //$NON-NLS-1$ - - // filter attributes - public static final String ATTRIBUTE_SUPPORTS_NESTED_FILTERS = "supportsNestedFilters"; //$NON-NLS-1$ - public static final String ATTRIBUTE_RELATIVE_ORDER = "relativeOrder"; //$NON-NLS-1$ - public static final String ATTRIBUTE_DEFAULT = "default"; //$NON-NLS-1$ - public static final String ATTRIBUTE_STRING_CASE_SENSITIVE = "stringsCaseSensitive"; //$NON-NLS-1$ - public static final String ATTRIBUTE_PROMPTABLE ="promptable"; //$NON-NLS-1$ - public static final String ATTRIBUTE_SUPPORTS_DUPLICATE_FILTER_STRINGS="supportsDuplicateFilterStrings"; //$NON-NLS-1$ - public static final String ATTRIBUTE_NON_DELETABLE="nonDeletable"; //$NON-NLS-1$ - public static final String ATTRIBUTE_NON_RENAMABLE="nonRenamable"; //$NON-NLS-1$ - public static final String ATTRIBUTE_NON_CHANGEABLE="nonChangable"; //$NON-NLS-1$ - public static final String ATTRIBUTE_STRINGS_NON_CHANGABLE="stringsNonChangable"; //$NON-NLS-1$ - public static final String ATTRIBUTE_RELEASE="release"; //$NON-NLS-1$ - public static final String ATTRIBUTE_SINGLE_FILTER_STRING_ONLY="singleFilterStringOnly"; //$NON-NLS-1$ - - // server launcher attributes - public static final String ATTRIBUTE_REXEC_PORT="rexecPort"; //$NON-NLS-1$ - public static final String ATTRIBUTE_DAEMON_PORT="daemonPort"; //$NON-NLS-1$ - public static final String ATTRIBUTE_PORT="port"; //$NON-NLS-1$ - public static final String ATTRIBUTE_SERVER_PATH="serverPath"; //$NON-NLS-1$ - public static final String ATTRIBUTE_SERVER_SCRIPT="serverScript"; //$NON-NLS-1$ - public static final String ATTRIBUTE_RESTRICTED_TYPES="restrictedTypes"; //$NON-NLS-1$ - - public static final String ATTRIBUTE_VALUE = "value"; //$NON-NLS-1$ - public static final String ATTRIBUTE_ID = "id"; //$NON-NLS-1$ - public static final String ATTRIBUTE_OWNING_PARENT_NAME = "owningParentName"; //$NON-NLS-1$ - public static final String ATTRIBUTE_REF_ID= "refID"; //$NON-NLS-1$ - public static final String ATTRIBUTE_DELETABLE = "deletable"; //$NON-NLS-1$ - public static final String ATTRIBUTE_TRUE = "true"; //$NON-NLS-1$ - public static final String ATTRIBUTE_FALSE = "false"; //$NON-NLS-1$ -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/dom/IRSEDOMExporter.java b/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/dom/IRSEDOMExporter.java deleted file mode 100644 index 7fb41e3838a..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/dom/IRSEDOMExporter.java +++ /dev/null @@ -1,130 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.persistence.dom; - - -import org.eclipse.rse.core.model.IRSEModelObject; -import org.eclipse.rse.core.subsystems.IConnectorService; -import org.eclipse.rse.core.subsystems.IServerLauncherProperties; -import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolReference; -import org.eclipse.rse.filters.ISystemFilterString; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemProfile; - - -public interface IRSEDOMExporter -{ - /** - * Creates the RSE DOM for this profile - * @param profile - * @param clean indicates whether to create from scratch or merger - * @return RSEDOM - */ - RSEDOM createRSEDOM(ISystemProfile profile, boolean clean); - - /** - * Creates an RSE DOM for use in persistence - * @param dom - * @param profile - * @return RSEDOM - */ - public RSEDOM populateRSEDOM(RSEDOM dom, ISystemProfile profile, boolean clean); - - /** - * Returns the RSEDOM for this profile iff it exists - * @param profile - * @return RSEDOM - */ - RSEDOM getRSEDOM(ISystemProfile profile); - - /** - * Create a DOM node representing a host - * @param parent - * @param host - * @return RSEDOMNode - */ - RSEDOMNode createNode(RSEDOMNode parent, IHost host, boolean clean); - - /** - * Creates a DOM node for a connector service - * @param parent - * @param connectorService - * @return RSEDOMNode - */ - RSEDOMNode createNode(RSEDOMNode parent, IConnectorService cs, boolean clean); - - /** - * Creates a DOM node for a server launcher - * @param parent - * @param serverLauncher - * @return RSEDOMNode - */ - RSEDOMNode createNode(RSEDOMNode parent, IServerLauncherProperties sl, boolean clean); - - /** - * Creates a DOM node for a subsystem - * @param parent - * @param subSystem - * @return RSEDOMNode - */ - RSEDOMNode createNode(RSEDOMNode parent, ISubSystem ss, boolean clean); - - /** - * Creates a DOM node for a filter - * @param parent - * @param filter - * @return RSEDOMNode - */ - RSEDOMNode createNode(RSEDOMNode parent, ISystemFilter sf, boolean clean); - - /** - * Create a DOM node representing a filter pool - * @param parent - * @param filterPool - * @return RSEDOMNode - */ - RSEDOMNode createNode(RSEDOMNode parent, ISystemFilterPool fp, boolean clean); - - - /** - * Creates a DOM node for a filter pool reference - * @param parent - * @param filterPoolReference - * @return RSEDOMNode - */ - RSEDOMNode createNode(RSEDOMNode parent , ISystemFilterPoolReference fpr, boolean clean); - - /** - * Creates a DOM node for a filter string - * @param parent - * @param filterString - * @return RSEDOMNode - */ - RSEDOMNode createNode(RSEDOMNode parent, ISystemFilterString fs, boolean clean); - - - /** - * Creates DOM nodes for each associated property set - * @param parent - * @param modelObject - * @return RSEDOMNode array - */ - RSEDOMNode[] createPropertySetNodes(RSEDOMNode parent, IRSEModelObject mo, boolean clean); -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/dom/IRSEDOMImporter.java b/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/dom/IRSEDOMImporter.java deleted file mode 100644 index 59a172e03fb..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/dom/IRSEDOMImporter.java +++ /dev/null @@ -1,78 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.persistence.dom; - - -import org.eclipse.rse.core.model.IPropertySet; -import org.eclipse.rse.core.model.IRSEModelObject; -import org.eclipse.rse.core.subsystems.IConnectorService; -import org.eclipse.rse.core.subsystems.IServerLauncherProperties; -import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolReference; -import org.eclipse.rse.filters.ISystemFilterString; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemProfile; -import org.eclipse.rse.model.ISystemProfileManager; - - - -public interface IRSEDOMImporter -{ - - /** - * Restores the profile represented by dom - * @param profileManager - * @param dom - * @return the restored profile - */ - ISystemProfile restoreProfile(ISystemProfileManager profileManager, RSEDOM dom); - - /** - * Restores the host represented by hostNode - */ - IHost restoreHost(ISystemProfile profile, RSEDOMNode hostNode); - - /** - * Restore the connector service represented by connectorServiceNode - */ - IConnectorService restoreConnectorService(IHost host, RSEDOMNode connectorServiceNode); - - IServerLauncherProperties restoreServerLauncher(IConnectorService service, RSEDOMNode serverLauncherNode, IServerLauncherProperties slproperties); - - /** - * Restores the subsystem represented by subSystemNode - */ - ISubSystem restoreSubSystem(IHost host, RSEDOMNode subSystemNode); - - - ISystemFilter restoreFilter(ISystemFilterPool filterPool, RSEDOMNode systemFilterNode); - - /** - * Restore the filter pool represented by the node - */ - ISystemFilterPool restoreFilterPool(ISystemProfile profile, RSEDOMNode systemFilterPoolNode); - - ISystemFilterPoolReference restoreFilterPoolReference(ISubSystem subSystem, RSEDOMNode systemFilterPoolReferenceNode); - ISystemFilterString restoreFilterString(ISystemFilter filter, RSEDOMNode systemFilterStringNode); - - /** - * Restores the property set represented by propertySetNode - */ - IPropertySet restorePropertySet(IRSEModelObject modelObject, RSEDOMNode propertySetNode); -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/dom/RSEDOM.java b/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/dom/RSEDOM.java deleted file mode 100644 index e3224ea5b15..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/dom/RSEDOM.java +++ /dev/null @@ -1,100 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.persistence.dom; - -import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.rse.model.ISystemProfile; - -/** - * This class is the root node of an RSE DOM. Each - * RSEDOM represents the properties of a profile to persist. - */ -public class RSEDOM extends RSEDOMNode { - - /* - * Recommended for serializable objects. This should be updated if there is a schema change. - */ - private static final long serialVersionUID = 1L; - private Job saveJob = null; - private transient ISystemProfile _profile; - - public RSEDOM(ISystemProfile profile) { - super(null, TYPE_PROFILE, profile.getName()); - _profile = profile; - } - - public RSEDOM(String profileName) { - super(null, TYPE_PROFILE, profileName); - _profile = null; - } - - public ISystemProfile getProfile() { - return _profile; - } - - /** - * Indicate that this DOM needs to be saved - */ - public void markForSave() { - if (!restoring && !_needsSave) { - _needsSave = true; - } - } - - /** - * @return true if this DOM has the DOM changed since last saved or restored. - */ - public boolean needsSave() { - return _needsSave; - } - - //for debugging only - public void print(RSEDOMNode node, String indent) { - String type = node.getType(); - String name = node.getName(); - RSEDOMNodeAttribute[] attributes = node.getAttributes(); - RSEDOMNode[] children = node.getChildren(); - - System.out.println(indent + "RSEDOMNode " + type); //$NON-NLS-1$ - System.out.println(indent + "{"); //$NON-NLS-1$ - String sindent = indent + " "; //$NON-NLS-1$ - - System.out.println(sindent + "name=" + name); //$NON-NLS-1$ - for (int i = 0; i < attributes.length; i++) { - RSEDOMNodeAttribute attribute = attributes[i]; - String key = attribute.getKey(); - String value = attribute.getValue(); - System.out.println(sindent + key + "=" + value); //$NON-NLS-1$ - } - - String cindent = sindent + " "; //$NON-NLS-1$ - for (int c = 0; c < children.length; c++) { - RSEDOMNode child = children[c]; - print(child, cindent); - } - System.out.println(indent + "}"); //$NON-NLS-1$ - } - - public Job getSaveJob() { - return saveJob; - } - - public void setSaveJob(Job saveJob) { - this.saveJob = saveJob; - } - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/dom/RSEDOMNode.java b/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/dom/RSEDOMNode.java deleted file mode 100644 index b19c1e65e08..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/dom/RSEDOMNode.java +++ /dev/null @@ -1,256 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.persistence.dom; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - - -public class RSEDOMNode implements IRSEDOMConstants, Serializable -{ - /* - * Recommended for serializable objects. This should be updated if there is a schema change. - */ - private static final long serialVersionUID = 1L; - protected String _type; - protected String _name; - protected RSEDOMNode _parent; - protected List _children; - protected List _attributes; - - protected boolean _needsSave = false; - protected boolean _isDirty = true; - protected boolean restoring = false; - - public RSEDOMNode(RSEDOMNode parent, String type, String name) - { - _type = type; - _name = name; - _parent = parent; - _children = new ArrayList(); - _attributes = new ArrayList(); - if (parent != null) - { - parent.addChild(this); - } - } - - public void markUpdated() - { - if (_needsSave) - { - _needsSave = false; - - for (int i = 0; i < _children.size(); i++) - { - RSEDOMNode child = (RSEDOMNode)_children.get(i); - child.markUpdated(); - } - } - } - - /** - * Propagate needs save indicator up to the root - */ - public void markForSave() - { - if (!restoring && !_needsSave) - { - _needsSave = true; - _parent.markForSave(); - } - } - - /** - * Recursively removes all the children from this node on down - * - */ - public void clearChildren() - { - RSEDOMNode[] children = getChildren(); - for (int i = 0; i < children.length; i++) - { - children[i].clearAttributes(); - children[i].clearChildren(); - } - _children.clear(); - } - - /** - * Clears all attributes - * - */ - public void clearAttributes() - { - _attributes.clear(); - } - - /** - * Returns the name of this node - */ - public String getName() - { - return _name; - } - - /** - * Returns the type of this node - */ - public String getType() - { - return _type; - } - - /** - * Returns the parent of this node - */ - public RSEDOMNode getParent() - { - return _parent; - } - - /** - * Returns all the children of this node - */ - public RSEDOMNode[] getChildren() - { - return (RSEDOMNode[])_children.toArray(new RSEDOMNode[_children.size()]); - } - - /** - * Returns the first attribute found that has the specified key - * @param key - */ - public RSEDOMNodeAttribute getAttribute(String key) - { - for (int i = 0; i < _attributes.size(); i++) - { - RSEDOMNodeAttribute attribute = (RSEDOMNodeAttribute)_attributes.get(i); - if (key.equals(attribute.getKey())) - { - return attribute; - } - } - return null; - } - - /** - * Returns the immediate children of this node that are of the specified type - * @param type - */ - public RSEDOMNode[] getChildren(String type) - { - List results = new ArrayList(); - for (int i = 0; i < _children.size(); i++) - { - RSEDOMNode child = (RSEDOMNode)_children.get(i); - if (type.equals(child.getType())) - { - results.add(child); - } - } - return (RSEDOMNode[])results.toArray(new RSEDOMNode[results.size()]); - } - - /** - * Returns the first immediate child of this node that is of the specified type and name - * @param type - * @param name - */ - public RSEDOMNode getChild(String type, String name) - { - for (int i = 0; i < _children.size(); i++) - { - RSEDOMNode child = (RSEDOMNode)_children.get(i); - if (type.equals(child.getType()) && name.equals(child.getName())) - { - return child; - } - } - return null; - } - - /** - * Returns all the attributes for this node - */ - public RSEDOMNodeAttribute [] getAttributes() - { - return (RSEDOMNodeAttribute[])_attributes.toArray(new RSEDOMNodeAttribute[_attributes.size()]); - } - - /** - * Adds a child to this node - * @param child - */ - public void addChild(RSEDOMNode child) - { - _children.add(child); - markForSave(); - } - - /** - * Removes a child from this node - * @param child - */ - public void removeChild(RSEDOMNode child) - { - _children.remove(child); - markForSave(); - } - - - /** - * Adds an attribute to the node - * @param name - * @param value - * @param type - */ - public void addAttribute(String name, String value, String type) - { - RSEDOMNodeAttribute attr = new RSEDOMNodeAttribute(name, value, type); - _attributes.add(attr); - markForSave(); - } - - /** - * Adds an attribute to the node - * @param name - * @param value - */ - public void addAttribute(String name, String value) - { - RSEDOMNodeAttribute attr = new RSEDOMNodeAttribute(name, value); - _attributes.add(attr); - markForSave(); - } - - public boolean isDirty() - { - return _isDirty; - } - - public void setDirty(boolean isDirty) - { - _isDirty = isDirty; - } - - public void setRestoring(boolean restoring) { - this.restoring = restoring; - } - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/dom/RSEDOMNodeAttribute.java b/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/dom/RSEDOMNodeAttribute.java deleted file mode 100644 index 15819a10520..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/dom/RSEDOMNodeAttribute.java +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - - -package org.eclipse.rse.persistence.dom; - -import java.io.Serializable; - -public class RSEDOMNodeAttribute implements Serializable -{ - private static final long serialVersionUID = 1L; - private String _key; - private String _value; - private String _type; - - public RSEDOMNodeAttribute(String key, String value, String type) - { - _key = key; - _value = value; - _type = type; - } - - public RSEDOMNodeAttribute(String key, String value) - { - _key = key; - _value = value; - _type = null; - } - - - public String getKey() - { - return _key; - } - - public String getValue() - { - return _value; - } - - public String getType() - { - return _type; - } -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/plugin.xml b/rse/plugins/org.eclipse.rse.ui/plugin.xml index c6320df07d0..f450b4f46aa 100644 --- a/rse/plugins/org.eclipse.rse.ui/plugin.xml +++ b/rse/plugins/org.eclipse.rse.ui/plugin.xml @@ -794,10 +794,6 @@ Contributors: - - - - @@ -900,20 +896,7 @@ Contributors: - - - - - - - + - - - - - - - - This extension point is used to allow the delegation of profile persistence to vendors where needed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - a unique name that will be used to identify the persistence Provider. - - - - - - - a translatable name that will be used to identify this persistence Provider in the UI. - - - - - - - a fully qualified name of the Java class that implements the <samp>org.eclipse.rse.persistence.IRSEPersistenceProvider</samp> interface. - - - - - - - - - - - - - - - 1.0.0 - - - - - - - - - The following is an example of this extension point's usage: - -<p> -<pre> - <extension point="org.eclipse.rse.ui.persistenceProviders"> - <persistenceProvider - id="org.eclipse.rse.persistence.DefaultRSEpersistenceProvider" - name="Default persistence Provider" - class="org.eclipse.rse.persistence.DefaultRSEpersistenceProvider"> - </persistenceProvider> - </extension> -</pre> -</p> - - - - - - - - - Plug-ins that want to extend this extension point must implement <samp>org.eclipse.rse.persistence.IRSEPersistenceProvider</samp> interface. - - - - - - - - - The Remote Systems Explorer in org.eclipse.rse.ui provides a default implementation of this extension point. - - - - - - - - - Copyright (c) 2006 IBM Corporation. All Rights Reserved. -This program and the accompanying materials are made available under the terms -of the Eclipse Public License v1.0 which accompanies this distribution, and is -available at http://www.eclipse.org/legal/epl-v10.html - -Contributors: -IBM Corporation - initial API and implementation - - - - diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/SubSystemFilterNamingPolicy.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/SubSystemFilterNamingPolicy.java deleted file mode 100644 index 360942bf2b0..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/SubSystemFilterNamingPolicy.java +++ /dev/null @@ -1,121 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.core.internal.subsystems; - -import org.eclipse.rse.core.filters.IRSEFilterNamingPolicy; -import org.eclipse.rse.internal.filters.SystemFilterNamingPolicy; - -/** - * A filter naming policy is responsible for returning the save file names for - * a given filter framework object. - * This policy implements our naming policy for the filter files in the - * remote systems project. - */ -public class SubSystemFilterNamingPolicy - extends SystemFilterNamingPolicy - implements IRSEFilterNamingPolicy -{ - - /** - * Constructor for SubSystemFilterNamingPolicy - */ - public SubSystemFilterNamingPolicy() - { - super(); - } - - /** - * Get the unqualified save file name for the given SystemFilterPoolManager object. - * Do NOT include the extension, as .xmi will be added. - *

    - * Returns "filterPools_"+managerName by default. - */ - public String getManagerSaveFileName(String managerName) - { - return super.getManagerSaveFileName(managerName); - } - /** - * Get the unqualified save file name for the given SystemFilterPoolReferenceManager object. - * Do NOT include the extension, as .xmi will be added. - *

    - * Returns "filterPoolRefs_"+managerName by default. - */ - public String getReferenceManagerSaveFileName(String managerName) - { - return super.getReferenceManagerSaveFileName(managerName); - } - /** - * Get the unqualified save file name for the given SystemFilterPool object. - * Do NOT include the extension, as .xmi will be added. - *

    - * Returns getFilterPoolSaveFileNamePrefix()+poolName by default. - */ - public String getFilterPoolSaveFileName(String poolName) - { - return super.getFilterPoolSaveFileName(poolName); - } - /** - * Get the file name prefix for all pool files. - * Used to deduce the saved pools by examining the file system - *

    - * By default returns "filterPool_" - */ - public String getFilterPoolSaveFileNamePrefix() - { - return super.getFilterPoolSaveFileNamePrefix(); - } - /** - * Get the folder name for the given SystemFilterPool object. - *

    - * Returns getFilterPoolFolderNamePrefix()+poolName by default. - */ - public String getFilterPoolFolderName(String poolName) - { - return super.getFilterPoolFolderName(poolName); - } - /** - * Get the folder name prefix for all pool folders. - * Used to deduce the saved pools by examining the file system - *

    - * By default returns "FilterPool_" - */ - public String getFilterPoolFolderNamePrefix() - { - return super.getFilterPoolFolderNamePrefix(); - } - /** - * Get the unqualified save file name for the given SystemFilter object. - * Do NOT include the extension, as .xmi will be added. - *

    - * Returns getFilterSaveFileNamePrefix()+filterName by default. - */ - public String getFilterSaveFileName(String filterName) - { - return super.getFilterSaveFileName(filterName); - } - /** - * Get the file name prefix for all filter files. - * Used to deduce the saved filters by examining the file system - *

    - * Returns "Filter_" by default. - */ - public String getFilterSaveFileNamePrefix() - { - return super.getFilterSaveFileNamePrefix(); - } - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/IServiceSubSystem.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/IServiceSubSystem.java deleted file mode 100644 index 50b6f3d0942..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/IServiceSubSystem.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.core.servicesubsystem; - -import org.eclipse.rse.core.subsystems.ISubSystem; - - -public interface IServiceSubSystem extends ISubSystem -{ - public Class getServiceType(); - public void switchServiceFactory(IServiceSubSystemConfiguration factory); -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/IServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/IServiceSubSystemConfiguration.java deleted file mode 100644 index db30998f26e..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/IServiceSubSystemConfiguration.java +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.core.servicesubsystem; - - -import org.eclipse.rse.core.subsystems.IConnectorService; -import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.services.IService; - - - -/** - * This is the interface for the class that is for subsystem-providers who desire not to use MOF. - * - * @lastgen interface DefaultSubSystemConfiguration extends SubSystemConfiguration {} - */ -public interface IServiceSubSystemConfiguration extends ISubSystemConfiguration -{ - public IConnectorService getConnectorService(IHost host); - public void setConnectorService(IHost host, IConnectorService connectorService); - public Class getServiceType(); - public Class getServiceImplType(); - public IService getService(IHost host); - -} //DefaultSubSystemConfiguration \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystem.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystem.java index 9b5e7aec810..b2c0b6fb401 100644 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystem.java +++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystem.java @@ -18,9 +18,10 @@ package org.eclipse.rse.core.servicesubsystem; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.subsystems.IConnectorService; +import org.eclipse.rse.core.subsystems.IServiceSubSystem; import org.eclipse.rse.core.subsystems.SubSystem; -import org.eclipse.rse.model.IHost; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.dialogs.PropertyPage; diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystemConfiguration.java index ef346469d43..7ce975fa7b9 100644 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystemConfiguration.java +++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystemConfiguration.java @@ -19,16 +19,17 @@ package org.eclipse.rse.core.servicesubsystem; import java.util.Vector; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage; import org.eclipse.rse.core.subsystems.AbstractConnectorService; import org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager; +import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.core.subsystems.SubSystemConfiguration; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; import org.eclipse.rse.ui.view.SubSystemConfigurationAdapter; -import org.eclipse.rse.ui.wizards.ISystemNewConnectionWizardPage; import org.eclipse.swt.widgets.Shell; diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/CommunicationsEvent.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/CommunicationsEvent.java deleted file mode 100644 index 398bc14c40a..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/CommunicationsEvent.java +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.core.subsystems; - - -public class CommunicationsEvent { - - - // Communications event types - public static final int BEFORE_CONNECT = 1; - public static final int AFTER_CONNECT = 2; - public static final int BEFORE_DISCONNECT = 3; - public static final int AFTER_DISCONNECT = 4; - public static final int CONNECTION_ERROR = 5; - - private IConnectorService system; - private int state; - - public CommunicationsEvent(IConnectorService system, int state) { - this.system = system; - this.state = state; - } - - public int getState() { - return state; - } - - public IConnectorService getSystem() { - return system; - } - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/ICommunicationsListener.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/ICommunicationsListener.java deleted file mode 100644 index b7659c912c7..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/ICommunicationsListener.java +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.core.subsystems; - - -/** - * ICommunicationsListener - listen to communication events - * @see CommunicationsEvent - */ -public interface ICommunicationsListener { - - - /** - * This method is invoked whenever the communications state is invoked - * immediately before and after the state of the communications changes. - * The state field in CommunicationsEvent determines which state - * change is about to or has occured. - */ - public void communicationsStateChange(CommunicationsEvent e); - - /** - * This method determines if the communications listener is a passive or - * active listener. Typically a passive listener registers with the communications - * system and responds to events as they occur. An active listener typically - * registeres with the communications system only for the duration of the task (i.e. - * user editing a file, or outstanding communications request.) - * - * The user will be prompted on a disconnect if there are any active communication - * listeners registered. - * - * @return false if the communications listener is an active listener, true if the - * communications listener is a passive listener. - */ - public boolean isPassiveCommunicationsListener(); -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IConnectorService.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IConnectorService.java deleted file mode 100644 index 7dcd6df17db..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IConnectorService.java +++ /dev/null @@ -1,338 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.core.subsystems; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.rse.core.model.IRSEModelObject; -import org.eclipse.rse.model.IHost; -import org.eclipse.swt.widgets.Shell; - - -/** - * This is the interface implemented by ConnectorService (formerly System) objects. - *

    - * A connector service manages a live connection to a remote system, with - * operations for connecting and disconnecting, and storing information - * typically cached from a subsystem: user ID, password, port, etc. - *

    - * The SubSystem interface includes a method, getConnectorService(), which returns an - * instance of an object that implements this interface for that subsystem. - *

    - * A single connector service object can be unique to a subsystem instance, but - * it can also be shared across multiple subsystems in a single host if those - * subsystems share a physical connection to the remote system. This sharing is done via - * subclasses of {@link org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager} - * which are returned by another getter method in SubSystem. - */ -public interface IConnectorService extends IRSEModelObject -{ - - /** - * Return the subsystem object this system is associated with - */ - public ISubSystem getPrimarySubSystem(); - - /** - * Return all the subsystems that use this service - * @return the subsystems that use this service - */ - public ISubSystem[] getSubSystems(); - - /** - * Set the subsystem, when its not known at constructor time - */ - public void registerSubSystem(ISubSystem ss); - - /** - * Deregister the subsystem - * @param ss - */ - public void deregisterSubSystem(ISubSystem ss); - - /** - * Return true if currently connected. - */ - public boolean isConnected(); - /** - * Attempt to connect to the remote system. - */ - public void connect(IProgressMonitor monitor) throws Exception; - /** - * Disconnect from the remote system - */ - public void disconnect(IProgressMonitor monitor) throws Exception; - /** - * Notifies all listeners of a disconnection through a communications event - */ - public void notifyDisconnection(); - /** - * Notifies all listeners of a connection through a communications event - */ - public void notifyConnection(); - /** - * Notifies all listeners of an error through a communications event - */ - public void notifyError(); - /** - * Reset after some fundamental change, such as a hostname change. - * Clear any memory of the current connection. - */ - public void reset(); - /** - * Return the version, release, modification of the remote system, - * if connected, if applicable and if available. Else return null. - *

    - * Up to each implementer to decide if this will be cached. - */ - public String getVersionReleaseModification(); - /** - * Return the home directory of the remote system for the current user, if available. - *

    - * Up to each implementer to decide how to implement, and if this will be cached. - */ - public String getHomeDirectory(); - /** - * Return the temp directory of the remote system for the current user, if available. - *

    - * Up to each implementer to decide how to implement, and if this will be cached. - */ - public String getTempDirectory(); - - // -------------------------------------------------------------------- - // Utility methods that offer combined connection and subsystem info... - // -------------------------------------------------------------------- - /** - * Return the system type for this connection. - */ - public String getHostType(); - - /** - * Return the name of this connector service - * @return the name of this connector service - */ - public String getName(); - - public void setHost(IHost host); - - /** - * Return the host - */ - public IHost getHost(); - - /** - * Return the host name for the connection this system's subsystem is associated with - */ - public String getHostName(); - - /** - * Return the port for this connector - */ - public int getPort(); - - /** - * Set the port for this connector - * @param port - */ - public void setPort(int port); - - /** - * Return the userId for this system's subsystem we are associated with - */ - public String getUserId(); - - /** - * Set the user id for this connector - * @param userId - */ - public void setUserId(String userId); - - - public boolean isUsingSSL(); - - public void setIsUsingSSL(boolean flag); - - /** - * Return the password for this system's subsystem we are associated with. - *

    - * If not currently set in transient memory, prompts the user for a password. - *

    - * Throws InterruptedException if user is prompted and user cancels that prompt. - * @param shell parent for the prompt dialog if needed. Can be null if know password exists. - * @param forcePrompt forces the prompt dialog to be displayed even if the password is currently - * in memory. - */ - public void promptForPassword(Shell shell, boolean forcePrompt) - throws InterruptedException; - /** - * Set the password if you got it from somewhere - */ - public void setPassword(String matchingUserId, String password); - - /** - * Set the password if you got it from somewhere - */ - public void setPassword(String matchingUserId, String password, boolean persist); - - /** - * Clear internal userId cache. Called when user uses the property dialog to - * change his userId. - */ - public void clearUserIdCache(); - /** - * Clear internal password cache. Called when user uses the property dialog to - * change his userId. - */ - public void clearPasswordCache(); - - /** - * Clear internal password cache. Called when user uses the property dialog to - * change his userId. - * @param clearDiskCache if true, clears the password from disk - */ - public void clearPasswordCache(boolean clearDiskCache); - /** - * Return true if password is currently cached. - */ - public boolean isPasswordCached(); - - - /** - * Return true if password is currently cached. - */ - public boolean isPasswordCached(boolean onDisk); - - /** - * Return true if this system can inherit the uid and password of - * other ISystems in this connection - * - * @return true if it can inherit the user/password - */ - public boolean inheritConnectionUserPassword(); - - /* - * Return true if this system can share it's uid and password - * with other ISystems in this connection - * - * @return true if it can share the user/password - */ - public boolean shareUserPasswordWithConnection(); - - /** - * Register a communications listener - */ - public void addCommunicationsListener(ICommunicationsListener listener); - /** - * Remove a communications listener - */ - public void removeCommunicationsListener(ICommunicationsListener listener); - /** - * Returns the suppressSignonPrompt flag. If this is set to true then the user - * will not be prompted to signon, instead an InterruptedException will be thrown - * by the promptForPassword method. - * - * @return boolean - */ - public boolean isSuppressSignonPrompt(); - /** - * Sets the suppressSignonPrompt flag. Tool writers can use this to temporarily - * disable the user from being prompted to signon. This would cause the promptForPassword - * method to throw an InterruptedException instead of prompting. The intent of this - * method is to allow tool writeres to prevent multiple signon prompts during a - * set period of time (such as a series of related communication calls) if the user - * cancels the first prompt. It is the callers responsability to set this value - * back to false when the tool no longer needs to suppress the signon prompt or all - * other tools sharing this connection will be affected. - * - * @param suppressSignonPrompt - */ - public void setSuppressSignonPrompt(boolean suppressSignonPrompt); - - /** - * Returns the value of the 'Remote Server Launcher' containment reference. - * It is bidirectional and its opposite is '{@link org.eclipse.rse.core.subsystems.IServerLauncherProperties#getParentSubSystem Parent Sub System}'. - * - *

    - * Get the remote server launcher, which may be null. This an optional object containing - * properties used to launch the remote server that communicates with this subsystem. - *

    - * - * @return the value of the 'Remote Server Launcher' containment reference. - * @see #setRemoteServerLauncher(IServerLauncherProperties) - * @see org.eclipse.rse.core.subsystems.SubsystemsPackage#getSubSystem_RemoteServerLauncher() - * @see org.eclipse.rse.core.subsystems.IServerLauncherProperties#getParentSubSystem - * @model opposite="parentSubSystem" containment="true" - * @generated - */ - IServerLauncherProperties getRemoteServerLauncherProperties(); - - /** - * Sets the value of the '{@link org.eclipse.rse.core.subsystems.ISubSystem#getRemoteServerLauncher Remote Server Launcher}' containment reference. - * - * Set the remote server launcher, which is an optional object containing - * properties used to launch the remote server that communicates with this subsystem. - * - * @param value the new value of the 'Remote Server Launcher' containment reference. - * @see #getRemoteServerLauncher() - * @generated - */ - void setRemoteServerLauncherProperties(IServerLauncherProperties value); - - boolean hasRemoteServerLauncherProperties(); - - boolean supportsRemoteServerLaunching(); - - /** - * Tell us if this subsystem factory supports server launch properties, which allow the user - * to configure how the server-side code for these subsystems are started. There is a Server - * Launch Setting property page, with a pluggable composite, where users can configure these - * properties. - */ - public boolean supportsServerLaunchProperties(); - - /** - * Report if this connector service can use a user identifier. - * Returns true in default implementation. - * Typically used to indicate if a login dialog needs to be presented when connecting. - * @return true if and only if the connector service can use a user id. - */ - public boolean supportsUserId(); - - /** - * Report if this connector service requires a user id. - * Returns true in default implementation. - * Typically used to indicate if a login dialog can allow an empty user id. - * Must be ignored if supportsUserId() is false. - * @return true or false to indicate if the connector service requires a user id. - */ - public boolean requiresUserId(); - - /** - * Can be used to determine if a password field is present on a login dialog for this connector service. - * The default implementation of this interface should return true. - * @return true if the subsystem can use a password, false if a password is irrelevant. - */ - public boolean supportsPassword(); - - /** - * If a password is supported this is used to determine if the password is required. - * Must be ignored if supportsPassword() returns false. - * The default implementation of this interface should return true. - * @return true if the connector service requires a password, false if a password may be empty. - */ - public boolean requiresPassword(); - - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IRemoteContainer.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IRemoteContainer.java deleted file mode 100644 index e2e33cbaa29..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IRemoteContainer.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2004, 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.core.subsystems; -import org.eclipse.rse.core.model.ISystemContainer; -import org.eclipse.rse.core.model.ISystemContentsType; - -/** - * @author dmcknigh - */ -public interface IRemoteContainer extends ISystemContainer -{ - - /** - * Returns whether the object has contents of a particular type associated with the specified filter string. - * @param contentsType type of contents - * @param filter criteria for contained contents - * @return true if the object has contents, false otherwise. - */ - public boolean hasContents(ISystemContentsType contentsType, String filter); - - /** - * Returns the contents of the object. - * @param contentsType type of contents - * @param filter criteria for contained contents. - * @return an array of contents. - */ - public Object[] getContents(ISystemContentsType contentsType, String filter); - - /* - * Replace occurrences of cached object with new object - */ - public void replaceContent(Object oldObject, Object newObject); - - /** - * Sets the contents of this object that match a particular filter - * @param contentsType type of contents - * @param filter matching criteria for the contained objects - * @param con the contained objects that match the filter - */ - public void setContents(ISystemContentsType contentsType, String filter, Object[] con); - - /** - * Copies the persistable contents from this one to another one - * @param container the container to copy contents to - */ - public void copyContentsTo(IRemoteContainer container); -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IRemoteLineReference.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IRemoteLineReference.java deleted file mode 100644 index c24ce5e2fed..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IRemoteLineReference.java +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.core.subsystems; -/** - * This interface represents an object that can be used to jump into line in source - */ -public interface IRemoteLineReference -{ - - - /** - * Gets the path to the file that this output references if it references any. It may return null if - * no such association exists. This may be used to jump to an editor from a view which displays - * this - * - * @return the path of the referenced file if there is one - */ - public String getAbsolutePath(); - - /** - * Gets the line number within a file that this references if it references any. By default - * it should return 0. If no file association exists, it also returns 0. This may be used to jump into - * a location within an editor from a view which displays remote output. - * - * @return the line number within a referenced file if there is one. - */ - public int getLine(); - - /** - * Get the start offset in a line corresponding to this reference. -1 indicates there is no offset - * @return the offset - */ - public int getCharStart(); - - /** - * Get the end offset in a line corresponding to this reference. -1 indicates there is no offset - * @return the offset - */ - public int getCharEnd(); - - /** - * Get the object that contains this object. - * - * @return the parent object - */ - public Object getParent(); - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IRemoteObjectIdentifier.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IRemoteObjectIdentifier.java deleted file mode 100644 index 2ef6338fc29..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IRemoteObjectIdentifier.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.core.subsystems; -public interface IRemoteObjectIdentifier -{ - - - /** - * For drag and drop, and clipboard, support of remote objects. - *

    - * Return the unique ID for the given remote object within the subsystem. - */ - public String getAbsoluteName(Object object); - - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IRemoteSystemEnvVar.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IRemoteSystemEnvVar.java deleted file mode 100644 index 22b14104325..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IRemoteSystemEnvVar.java +++ /dev/null @@ -1,78 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.core.subsystems; - - - -// - - -/** - * @lastgen interface RemoteSystemEnvVar {} - */ - -public interface IRemoteSystemEnvVar { - - - - /** - * - * - * @generated - */ - String copyright = "(c) Copyright IBM Corporation 2002, 2004."; - - /** - * @generated This field/method will be replaced during code generation - * @return The value of the Name attribute - * The name of the environment variable to set at connect time - */ - String getName(); - - /** - * @generated This field/method will be replaced during code generation - * @param value The new value of the Name attribute - */ - void setName(String value); - - /** - * @generated This field/method will be replaced during code generation - * @return The value of the Value attribute - * The value to set this environment variable to at connect time - */ - String getValue(); - - /** - * @generated This field/method will be replaced during code generation - * @param value The new value of the Value attribute - */ - void setValue(String value); - - /** - * @generated This field/method will be replaced during code generation - * @return The value of the AdditionalAttributes attribute - * Additional attributes that may need to be persisted per environment variable. - */ - String getAdditionalAttributes(); - - /** - * @generated This field/method will be replaced during code generation - * @param value The new value of the AdditionalAttributes attribute - */ - void setAdditionalAttributes(String value); - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java deleted file mode 100644 index 392fb692a18..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java +++ /dev/null @@ -1,582 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.core.subsystems; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.rse.core.persistance.IRSEPersistableContainer; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; -import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemProfile; -import org.eclipse.rse.ui.validators.ISystemValidator; -import org.eclipse.rse.ui.wizards.ISystemNewConnectionWizardPage; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Shell; - - -public interface ISubSystemConfiguration extends ISystemFilterPoolManagerProvider, IRSEPersistableContainer -{ - // --------------------------------- - // CONSTANTS... - // --------------------------------- - public static final boolean FORCE_INTO_MEMORY = true; - public static final boolean LAZILY = false; - - /** - * Reset for a full refresh from disk, such as after a team synch. - */ - public void reset(); - // --------------------------------- - // CRITICAL METHODS... - // --------------------------------- - /** - * Return true if the subsystem supports more than one filter string - *

    RETURNS true BY DEFAULT - */ - public boolean supportsMultiStringFilters(); - - /** - * Return true if the subsystem supports the exporting of filter strings from it's filters - *

    RETURNS true BY DEFAULT - */ - public boolean supportsFilterStringExport(); - - /** - * Return true if subsystem instances from this factory support connect and disconnect actions - *

    Returns true in default implementation. - */ - public boolean supportsSubSystemConnect(); - /** - * Return true (default) or false to indicate if subsystems of this factory support user-editable - * port numbers. - *

    Returns true in default implementation. - */ - public boolean isPortEditable(); - /** - * Return true if subsystem instances from this factory support remote command execution - *

    Returns false in default implementation, and is usually only true for command subsystems. - */ - public boolean supportsCommands(); - /** - * Return true if subsystem instances from this factory support getting and setting properties - *

    Returns false in default implementation, and not actually used yet. - */ - public boolean supportsProperties(); - /** - * Required method for subsystem factory child classes. Return true if you support filters, false otherwise. - * If you support filters, then some housekeeping will be done for you automatically. Specifically, they - * will be saved and restored for you automatically. - *

    Returns true in default implementation. - */ - public boolean supportsFilters(); - - /** - * Indicates whether the subsystem supports displaying children under - * its filters. By default, this will return true, but if filters that can't - * be expanded are desired, this can be overridden to return false. - */ - public boolean supportsFilterChildren(); - - /** - * Required method for subsystem factory child classes. Return true if you filter caching. - * If you support filter caching, then the views will always check the in-memory cache for - * filter results before attempting a query. - *

    Returns true in default implementation. - */ - public boolean supportsFilterCaching(); - - /** - * Required method for subsystem factory child classes. Return true if you support filters, and you support - * multiple filter strings per filter. Return false to restrict the user to one string per filter. - *

    Returns true in default implementation. - */ - public boolean supportsMultipleFilterStrings(); - /** - * Required method for subsystem factory child classes if returning true from supportsFilters. - * Return true if you support filters within filters, false otherwise. - *

    Returns false in default implementation. - */ - public boolean supportsNestedFilters(); - /** - * Return true if you support quick filters. These allow the user to subset a remote system object at - * the time they expand it in the remote system explorer tree view. - *

    - * Not supported yet - */ - public boolean supportsQuickFilters(); - - /** - * Return true if filters of this subsystem factory support dropping into. - */ - public boolean supportsDropInFilters(); - - /** - * Return true if filters of this subsystem factory provide a custom implementation of drop support. - * By default, the filter reference adapter treats a drop on a filter as an update to the list of filter - * strings for a filter. For things like files, it is more desirable to treat the drop as a physical - * resource copy, so in that case, custom drop makes sense. - * - * By default this returns false. - */ - public boolean providesCustomDropInFilters(); - - /** - * Return true if you support user-defined actions for the remote system objects returned from expansion of - * subsystems created by this subsystem factory - * @see #getActionSubSystem(ISubSystem) - * @see #supportsUserDefinedActions(ISelection) - *

    Returns false in default implementation. - */ - public boolean supportsUserDefinedActions(); - /** - * Return true if you support user-defined actions for the remote system objects explicitly given. This - * calls supportsUserDefinedActions() by default. It is called when decided whether or not to show - * the User Actions menu for the current selection, if supportsUserDefinedActions() returns true. - * @see #getActionSubSystem(ISubSystem) - * @see #createActionSubSystem() - * @see #addCommonRemoteActions(SystemMenuManager, IStructuredSelection, Shell, String, ISubSystem) - */ - public boolean supportsUserDefinedActions(ISelection selection); - /** - * Return true if you support compile actions for the remote system objects returned from expansion of - * subsystems created by this subsystem factory. - * @see #getCompileManager() - *

    Returns false in default implementation. - */ - public boolean supportsCompileActions(); - /** - * Return true if you support user-defined/managed named file types - *

    Returns false in default implementation. - */ - public boolean supportsFileTypes(); - /** - * Tell us if this subsystem factory supports targets, which are destinations for - * pushes and builds. Normally only true for file system factories. - */ - public boolean supportsTargets(); - /** - * Tell us if this subsystem factory supports server launch properties, which allow the user - * to configure how the server-side code for these subsystems are started. There is a Server - * Launch Setting property page, with a pluggable composite, where users can configure these - * properties. - *
    By default we return false here. This is overridden in UniversalFileSubSystemConfiguration though. - */ - public boolean supportsServerLaunchProperties(IHost host); - /** - * If {@link #supportsServerLaunchProperties(IHost)} returns true, this method may be called by - * the server launcher to decide if a given remote server launch type is supported or not. - *
    We return true by default. - * @see org.eclipse.rse.core.subsystems.ServerLaunchType - * @see #getServerLauncherForm(Shell, ISystemMessageLine) - */ - public boolean supportsServerLaunchType(ServerLaunchType serverLaunchType); - - /** - * Tell us if filter strings are case sensitive. - *

    Returns false in default implementation. - */ - public boolean isCaseSensitive(); - - // --------------------------------- - // USER-PREFERENCE METHODS... - // --------------------------------- - /** - * If we support filters, should we show filter pools in the remote system explorer? - * Typically retrieved from user preferences. - */ - public boolean showFilterPools(); - /* - * If we support filters, should we show filter strings in the remote system explorer? - * Typically retrieved from user preferences. - * - public boolean showFilterStrings(); - */ - /** - * If we support filters, should we show filter pools in the remote system explorer? - * This is to set it after the user changes it in the user preferences. It may require - * refreshing the current view. - */ - public void setShowFilterPools(boolean show); - /* - * If we support filters, should we show filter strings in the remote system explorer? - * This is to set it after the user changes it in the user preferences. It may require - * refreshing the current view. - * - public void setShowFilterStrings(boolean show); - */ - - // --------------------------------- - // PROXY METHODS. USED INTERNALLY... - // --------------------------------- - /** - * Private method called by RSEUIPlugin - */ - public void setSubSystemConfigurationProxy(ISubSystemConfigurationProxy proxy); - /** - * Private method - */ - public ISubSystemConfigurationProxy getSubSystemConfigurationProxy(); - - // --------------------------------- - // FACTORY ATTRIBUTE METHODS... - // --------------------------------- - /** - * Return vendor of this factory. - * This comes from the xml "vendor" attribute of the extension point. - */ - public String getVendor(); - /** - * Return name of this factory. Matches value in name attribute in extension point xml - */ - public String getName(); - /** - * Return description of this factory. Comes from translated description string in extension point xml - */ - public String getDescription(); - /** - * Return unique id of this factory. Matches value in id attribute in extension point xml - */ - public String getId(); - /** - * Return image descriptor for subsystems created by this factory. Comes from icon attribute in extension point xml - */ - public ImageDescriptor getImage(); - /** - * Return actual graphics Image of this factory. - * This is the same as calling getImage().createImage() but the resulting image is cached - */ - public Image getGraphicsImage(); - /** - * Return image to use when this susystem is connection. Comes from icon attribute in extension point xml - */ - public ImageDescriptor getLiveImage(); - /** - * Return actual graphics LiveImage of this factory. - * This is the same as calling getLiveImage().createImage() but the resulting image is cached - */ - public Image getGraphicsLiveImage(); - /** - * Return the category this subsystem factory subscribes to. - * @see org.eclipse.rse.core.model.ISubSystemConfigurationCategories - */ - public String getCategory(); - /** - * Return the system types this subsystem factory supports. - */ - public String[] getSystemTypes(); - - // --------------------------------- - // PROFILE METHODS... - // --------------------------------- - /** - * Called by SystemRegistry when we are about to delete a profile. - *

    - * Our only mission is to delete the filter pool associated with it, - * because the registry has already called deleteSubSystemsByConnection - * for every subsystem of every connection owned by this profile. - */ - public void deletingSystemProfile(ISystemProfile profile); - /** - * Called by SystemRegistry when we have toggled the active-status of a profile - */ - public void changingSystemProfileActiveStatus(ISystemProfile profile, boolean newStatus); - /** - * Get owning profile object given a filter pool object - */ - public ISystemProfile getSystemProfile(ISystemFilterPool pool); - - // --------------------------------- - // SUBSYSTEM METHODS... - // --------------------------------- - /** - * Return the validator for the userId. - * A default is supplied. - * Note this is only used for the subsystem's properties, so will not - * be used by the connection's default. Thus, is only of limited value. - *

    - * This must be castable to ICellEditorValidator for the property sheet support. - */ - public ISystemValidator getUserIdValidator(); - /** - * Return the validator for the password which is prompted for at runtime. - * No default is supplied. - */ - public ISystemValidator getPasswordValidator(); - /** - * Return the validator for the port. - * A default is supplied. - * This must be castable to ICellEditorValidator for the property sheet support. - */ - public ISystemValidator getPortValidator(); - /** - * Called by SystemRegistry's renameSystemProfile method to ensure we update our - * subsystem names within each subsystem. - *

    - * This is called AFTER changing the profile's name!! - */ - public void renameSubSystemProfile(ISubSystem ss, String oldProfileName, String newProfileName); - /** - * Called by SystemRegistry's renameSystemProfile method to pre-test if we are going to run into errors on a - * profile rename, due to file or folder in use. - */ - public void preTestRenameSubSystemProfile(String oldProfileName) throws Exception; - /** - * Called by SystemRegistry's renameConnection method to ensure we update our - * connection names within each subsystem. - *

    - * Must be called prior to changing the connection's name!! - */ - public void renameSubSystemsByConnection(IHost conn, String newConnectionName); - /** - * Called by SystemRegistry's deleteConnection method to ensure we delete all our - * subsystems for a given connection. - */ - public void deleteSubSystemsByConnection(IHost conn); - - /** - * Creates a new subsystem instance that is associated with the given connection object. - * SystemRegistryImpl calls this when a new connection is created, and appliesToSystemType returns true. - * @param conn The connection to create a subsystem for - * @param creatingConnection true if we are creating a connection, false if just creating - * another subsystem for an existing connection. - * @param yourNewConnectionWizardPages The wizard pages you supplied to the New Connection wizard, via the - * {@link org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter#getNewConnectionWizardPages(ISubSystemConfiguration, org.eclipse.jface.wizard.IWizard)} - * method or null if you didn't override this method. - */ - public ISubSystem createSubSystem(IHost conn, boolean creatingConnection, ISystemNewConnectionWizardPage[] yourNewConnectionWizardPages); - - // used in the case where newsubsystems are added after a connection exists - public ISubSystem createSubSystemAfterTheFact(IHost conn); - - public ISubSystem createSubSystemInternal(IHost conn); - - - /** - * Find or create a connector service for this host - */ - public IConnectorService getConnectorService(IHost host); - - /** - * Overridable entry for child classes to contribute a server launcher instance - * for a given subsystem. - *

    - * Create an instance of ServerLauncher, and add it to the given subsystem. - * When a subsystem is created, and {@link #supportsServerLaunchProperties(IHost)} - * returns true, this method is called to create the server launcher instance - * associated with the subsystem. The default implementation is to create an - * instance of {@link IRemoteServerLauncher}, but override to create your own - * ServerLauncher instance if you have your own class. - */ - public IServerLauncherProperties createServerLauncher(IConnectorService connectorService); - - /** - * Updates user-editable attributes of an existing subsystem instance. - * These attributes typically affect the live connection, so the subsystem will be forced to - * disconnect. - *

    - * The subsystem will be saved to disk. - * @param shell parent shell needed in case an error message is displayed - * @param subsystem target of the update action - * @param updateUserId true if we are updating the userId, else false to ignore userId - * @param userId new local user Id. Ignored if updateUserId is false - * @param updatePort true if we are updating the port, else false to ignore port - * @param port new local port value. Ignored if updatePort is false - */ - public void updateSubSystem(Shell shell, ISubSystem subsystem, boolean updateUserId, String userId, boolean updatePort, int port); - /** - * Update the port for the given subsystem instance. - * Shortcut to {@link #updateSubSystem(Shell, ISubSystem, boolean, String, boolean, int)} - */ - public void setSubSystemPort(Shell shell, ISubSystem subsystem, int port); - /** - * Update the user ID for the given subsystem instance. - * Shortcut to {@link #updateSubSystem(Shell, ISubSystem, boolean, String, boolean, int)} - */ - public void setSubSystemUserId(Shell shell, ISubSystem subsystem, String userId); - - /** - * Returns true if this factory allows users to delete instances of subsystem objects. - * Would only be true if users are allowed to create multiple instances of subsystem objects - * per connection. - */ - public boolean isSubSystemsDeletable(); - /** - * Deletes a given subsystem instance from the list maintained by this factory. - * SystemRegistryImpl calls this when the user selects to delete a subsystem object, - * or delete the parent connection this subsystem is associated with. - * In former case, this is only called if the factory supports user-deletable subsystems. - */ - public boolean deleteSubSystem(ISubSystem subsystem); - /** - * Clone a given subsystem into the given connection. - * Called when user does a copy-connection action. - * @param oldSubsystem The subsystem to be cloned - * @param newConnection The connection into which to create and clone the old subsystem - * @param copyProfileOperation Pass true if this is an profile-copy operation versus a connection-copy operation - * @return New subsystem within the new connection - */ - public ISubSystem cloneSubSystem(ISubSystem oldSubsystem, IHost newConnection, boolean copyProfileOperation) - throws Exception; - /** - * Returns a list of subsystem objects existing for the given connection. - * @param conn System connection to retrieve subsystems for - * @param force true if we should force all the subsystems to be restored from disk if not already - */ - public ISubSystem[] getSubSystems(IHost conn, boolean force); - /** - * Returns a list of all subsystem objects for all connections. - */ - public ISubSystem[] getSubSystems(boolean force); - /** - * Renames a subsystem. This is better than ss.setName(String newName) as it saves the subsystem to disk. - */ - public void renameSubSystem(ISubSystem subsystem, String newName); - /** - * Disconnect all subsystems currently connected. - * Called by shutdown() of RSEUIPlugin. - */ - public void disconnectAllSubSystems() - throws Exception; - - // --------------------------------- - // FILTER POOL METHODS... - // --------------------------------- - /** - * Get the filter pool manager for the given profile - */ - public ISystemFilterPoolManager getFilterPoolManager(ISystemProfile profile); - /** - * Copy the filter pool manager and return a new one. Called during profile-copy operations. - * Will also copy all of the filter pools and their respective data. - */ - public ISystemFilterPoolManager copyFilterPoolManager(ISystemProfile oldProfile, ISystemProfile newProfile) - throws Exception; - - /** - * Given a subsystem, return the first (hopefully only) default pool for this - * subsystem's profile. - */ - public ISystemFilterPool getDefaultSystemFilterPool(ISubSystem subsys); - /** - * Test if any filter pools in the given profile are referenced by other profiles, - * which are active. - *

    - * Called when user tries to make a profile inactive. We prevent this if there exists - * active references. - * @param profile The profile being tested - * @return An array of the active subsystems which reference filter pools in this profile, - * or null if none are found. - */ - public ISubSystem[] testForActiveReferences(ISystemProfile profile); - - // --------------------------------- - // FILTER METHODS - // --------------------------------- - /** - * Return the translated string to show in the property sheet for the type property when a filter is selected. - */ - public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter); - /** - * Return true if we should show the refresh action in the popup for the given element. - */ - public boolean showRefreshOnFilter(); - - /** - * Return true if we should show the show in table action in the popup for the given element. - */ - public boolean showGenericShowInTableOnFilter(); - - - - - /** - * Given a filter, decide whether to show the Filter Strings property page - * for this filter. Default is true. - */ - public boolean showChangeFilterStringsPropertyPage(ISystemFilter filter); - - - /** - * Determines whether this factory is responsible for the creation of subsytems of the specified type - * Subsystem factories should override this to indicate which subsystems they support. - * - * @param subSystemType type of subsystem - * @return whether this factory is for the specified subsystemtype - */ - public boolean isFactoryFor(Class subSystemType); - - // --------------------------------- - // FILTER REFERENCE METHODS - // --------------------------------- - - // --------------------------------- - // STATE METHODS... - // --------------------------------- - /** - * Called by adapters prior to asking for actions, in case the connection of the currently selected - * object is required by the action. - */ - public void setConnection(IHost connection); - /** - * Called by adapters prior to asking for actions. For cases when current selection is needed. - */ - public void setCurrentSelection(Object[] selection); - // --------------------------------- - // SAVE METHODS... - // --------------------------------- - /** - * Saves absolutely everything to disk. This is called as a safety - * measure when the workbench shuts down. - *

    - * Totally handled for you! - *

    - * Calls saveSubSystems() and saveFilterPools() - *

    - * Exceptions are swallowed since we cannot deal with them on shutdown anyway! - */ - public boolean commit(); - /** - * Save one subsystem to disk. - * Called by each subsystem when their data changes. - */ - public void saveSubSystem(ISubSystem subsys) - throws Exception; - - /** - * Private. Do not call or use.
    - * @generated This field/method will be replaced during code generation - * @return The list of SubSystemList references - */ - java.util.List getSubSystemList(); - - /** - * Private. Do not call or use.
    - * @generated This field/method will be replaced during code generation - * @return The list of FilterPoolManagerList references - */ - java.util.List getFilterPoolManagerList(); - - public ISystemFilterPool getDefaultFilterPool(ISystemProfile profile, String oldProfileName); - public ISystemProfile getSystemProfile(String name); - public void renameFilterPoolManager(ISystemProfile profile); - - - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/ISubSystemConfigurationProxy.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/ISubSystemConfigurationProxy.java deleted file mode 100644 index 20d1fee6271..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/ISubSystemConfigurationProxy.java +++ /dev/null @@ -1,109 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.core.subsystems; -import org.eclipse.jface.resource.ImageDescriptor; - -/** - * Interface to SubSystemConfigurationExtension class - * Internal use, not likely you will ever need to use it or access it directly. - */ -public interface ISubSystemConfigurationProxy -{ - /** - * Return value of the name xml attribute. - * Return name of this factory. Matches value in name attribute in extension point xml - */ - public String getName(); - /** - * Return value of the description xml attribute. - * Return description of this factory. Matches value in description attribute in extension point xml - */ - public String getDescription(); - /** - * Return value of the id xml attribute. - * Return unique id of this configuration. - */ - public String getId(); - /** - * Return value of the systemTypes xml attribute. - * Return the system types this subsystem configuration supports. - */ - public String[] getSystemTypes(); - /** - * Return true if this factory supports all system types - */ - public boolean supportsAllSystemTypes(); - - /** - * Return value of the vendor xml attribute. - * Return vendor of this configuration. - */ - public String getVendor(); - /** - * Return value of the category xml attribute. - * Return the category this subsystem configuration subscribes to. - * @see org.eclipse.rse.core.model.ISubSystemConfigurationCategories - */ - public String getCategory(); - /** - * Return value of the icon xml attribute. - * Return actual graphics image used for subsystems when there is no live connection. - */ - public ImageDescriptor getImage(); - /** - * Return value of the iconlive xml attribute. - * Return actual graphics image used for subsystems when there is a live connection. - */ - public ImageDescriptor getLiveImage(); - - /** - * Return true if the subsystem factory has been instantiated yet - */ - public boolean isSubSystemConfigurationActive(); - - /** - * Returns the priority of the subsystem configuration. - */ - public int getPriority(); - - /** - * Return the subsystem factory singleton instance. Will instantiate if not already. - */ - public ISubSystemConfiguration getSubSystemConfiguration(); - /** - * Return an instance of the ISystem class identified by the "systemClass" attribute - * of this subsystemFactory extension point. Note each call to this method returns a - * new instance of the class, or null if no "systemClass" attribute was specified. - */ - public IConnectorService getSystemObject(); - - /** - * Test if the given system type matches one or more of the type names declared in the - * systemTypes attribute of this extension. - */ - public boolean appliesToSystemType(String type); - - /** - * Reset for a full refresh from disk, such as after a team synch. - */ - public void reset(); - - /** - * After a reset, restore from disk - */ - public void restore(); -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/util/ISubSystemConfigurationAdapter.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/util/ISubSystemConfigurationAdapter.java index 56ee9a8b671..d6f1b460203 100644 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/util/ISubSystemConfigurationAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/util/ISubSystemConfigurationAdapter.java @@ -20,23 +20,26 @@ import org.eclipse.jface.action.IAction; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.wizard.IWizard; +import org.eclipse.rse.core.filters.ISystemFilter; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolReference; +import org.eclipse.rse.core.filters.ISystemFilterReference; +import org.eclipse.rse.core.filters.ISystemFilterString; +import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; -import org.eclipse.rse.filters.ISystemFilter; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolReference; -import org.eclipse.rse.filters.ISystemFilterReference; -import org.eclipse.rse.filters.ISystemFilterString; import org.eclipse.rse.ui.SystemMenuManager; import org.eclipse.rse.ui.filters.actions.SystemNewFilterAction; import org.eclipse.rse.ui.messages.ISystemMessageLine; import org.eclipse.rse.ui.propertypages.ISystemSubSystemPropertyPageCoreForm; import org.eclipse.rse.ui.propertypages.SystemChangeFilterPropertyPage; import org.eclipse.rse.ui.propertypages.SystemFilterStringPropertyPage; +import org.eclipse.rse.ui.validators.ISystemValidator; import org.eclipse.rse.ui.widgets.IServerLauncherForm; -import org.eclipse.rse.ui.wizards.ISystemNewConnectionWizardPage; import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.dialogs.PropertyPage; /** * Defines the interface that must be implemented for adapters of for subsystem configurations. @@ -243,4 +246,39 @@ public interface ISubSystemConfigurationAdapter public ImageDescriptor getSystemFilterStringImage(String filterStringString); public void renameSubSystemProfile(ISubSystemConfiguration factory, String oldProfileName, String newProfileName); + + /** + * Return the single property page to show in the tabbed notebook for the + * for SubSystem property of the parent Connection. Return null if no + * page is to be contributed for this. You are limited to a single page, + * so you may have to compress. It is recommended you prompt for the port + * if applicable since the common base subsystem property page is not shown + * To help with this you can use the SystemPortPrompt widget. + */ + public PropertyPage getPropertyPage(ISubSystem subsystem, Composite parent); + + + + + /** + * Return the validator for the userId. + * A default is supplied. + * Note this is only used for the subsystem's properties, so will not + * be used by the connection's default. Thus, is only of limited value. + *

    + * This must be castable to ICellEditorValidator for the property sheet support. + */ + public ISystemValidator getUserIdValidator(ISubSystemConfiguration config); + /** + * Return the validator for the password which is prompted for at runtime. + * No default is supplied. + */ + public ISystemValidator getPasswordValidator(ISubSystemConfiguration confi); + /** + * Return the validator for the port. + * A default is supplied. + * This must be castable to ICellEditorValidator for the property sheet support. + */ + public ISystemValidator getPortValidator(ISubSystemConfiguration confi); + } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/PasswordPersistenceManager.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/PasswordPersistenceManager.java index b7bd0b721f0..fca1d502d8d 100644 --- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/PasswordPersistenceManager.java +++ b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/PasswordPersistenceManager.java @@ -31,7 +31,7 @@ import org.eclipse.core.runtime.IExtensionPoint; import org.eclipse.core.runtime.IExtensionRegistry; import org.eclipse.core.runtime.Platform; import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.rse.model.SystemSignonInformation; +import org.eclipse.rse.core.model.SystemSignonInformation; import org.eclipse.rse.ui.ISystemPreferencesConstants; import org.eclipse.rse.ui.RSEUIPlugin; diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPreferencesManager.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPreferencesManager.java index 4a3ccb97d88..f6123f0f38f 100644 --- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPreferencesManager.java +++ b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPreferencesManager.java @@ -25,8 +25,8 @@ import java.util.Vector; import org.eclipse.core.runtime.Preferences; import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemRegistry; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.ui.ISystemPreferencesConstants; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.propertypages.RemoteSystemsPreferencePage; diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemRemoteObjectMatcher.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemRemoteObjectMatcher.java index 52f884eea40..e0e13ec2b21 100644 --- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemRemoteObjectMatcher.java +++ b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemRemoteObjectMatcher.java @@ -18,8 +18,8 @@ package org.eclipse.rse.core; import java.util.StringTokenizer; import java.util.Vector; +import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.model.IHost; import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceListener.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceListener.java index bf3ae95cd8e..3d2d6fc3a42 100644 --- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceListener.java +++ b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceListener.java @@ -24,8 +24,9 @@ import org.eclipse.core.resources.IResourceChangeListener; import org.eclipse.core.resources.IResourceDelta; import org.eclipse.core.resources.IWorkspace; import org.eclipse.rse.core.model.ISystemModelChangeEvents; +import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.internal.model.SystemModelChangeEvent; -import org.eclipse.rse.model.ISystemRegistry; +import org.eclipse.rse.model.SystemRegistry; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.view.SystemPerspectiveLayout; import org.eclipse.rse.ui.view.SystemView; @@ -52,7 +53,7 @@ public class SystemResourceListener implements IResourceChangeListener, Runnable private static SystemResourceListener inst = null; private IProject remoteSystemsProject = null; private boolean ignoreEvents = true; - + ; private boolean ensureEventsOnMode = false; private boolean sawSyncEvent = false; private boolean changesPending = false; @@ -372,12 +373,12 @@ public class SystemResourceListener implements IResourceChangeListener, Runnable { switch (type) { - case IResource.ROOT : return "root"; //$NON-NLS-1$ - case IResource.PROJECT : return "project"; //$NON-NLS-1$ - case IResource.FOLDER : return "folder"; //$NON-NLS-1$ - case IResource.FILE : return "file"; //$NON-NLS-1$ + case IResource.ROOT : return "root"; + case IResource.PROJECT : return "project"; + case IResource.FOLDER : return "folder"; + case IResource.FILE : return "file"; } - return "unknown: "+Integer.toString(type); //$NON-NLS-1$ + return "unknown: "+Integer.toString(type); } /** @@ -397,7 +398,7 @@ public class SystemResourceListener implements IResourceChangeListener, Runnable if (debug) { kindString = getKindString(kind); - pre = kindString + ": " + indent; //$NON-NLS-1$ + pre = kindString + ": " + indent; SystemBasePlugin.logInfo(pre + delta + ": flags: " + getKindString(flags)); } if (resource == null) @@ -440,63 +441,63 @@ public class SystemResourceListener implements IResourceChangeListener, Runnable { IResourceDelta[] subdeltas = delta.getAffectedChildren(); for (int i = 0; !stop && (i < subdeltas.length); i++) - stop = !processDelta(indent + " ", subdeltas[i]); //$NON-NLS-1$ + stop = !processDelta(indent + " ", subdeltas[i]); } return !stop; } public static String getKindString(int kind) { - String kindString = "Unknown: " + Integer.toString(kind); //$NON-NLS-1$ + String kindString = "Unknown: " + Integer.toString(kind); switch (kind) { case IResourceDelta.ADDED : - kindString = "ADDED"; //$NON-NLS-1$ + kindString = "ADDED"; break; case IResourceDelta.ADDED_PHANTOM : - kindString = "ADDED_PHANTOM"; //$NON-NLS-1$ + kindString = "ADDED_PHANTOM"; break; case IResourceDelta.ALL_WITH_PHANTOMS : - kindString = "ALL_WITH_PHANTOMS"; //$NON-NLS-1$ + kindString = "ALL_WITH_PHANTOMS"; break; case IResourceDelta.CHANGED : - kindString = "CHANGED"; //$NON-NLS-1$ + kindString = "CHANGED"; break; case IResourceDelta.CONTENT : - kindString = "CONTENT"; //$NON-NLS-1$ + kindString = "CONTENT"; break; case IResourceDelta.DESCRIPTION : - kindString = "DESCRIPTION"; //$NON-NLS-1$ + kindString = "DESCRIPTION"; break; case IResourceDelta.MARKERS : - kindString = "ADDED"; //$NON-NLS-1$ + kindString = "ADDED"; break; case IResourceDelta.MOVED_FROM : - kindString = "MOVED_FROM"; //$NON-NLS-1$ + kindString = "MOVED_FROM"; break; case IResourceDelta.MOVED_TO : - kindString = "MOVED_TO"; //$NON-NLS-1$ + kindString = "MOVED_TO"; break; case IResourceDelta.NO_CHANGE : - kindString = "NO_CHANGE"; //$NON-NLS-1$ + kindString = "NO_CHANGE"; break; case IResourceDelta.OPEN : - kindString = "OPEN"; //$NON-NLS-1$ + kindString = "OPEN"; break; case IResourceDelta.REMOVED : - kindString = "REMOVED"; //$NON-NLS-1$ + kindString = "REMOVED"; break; case IResourceDelta.REMOVED_PHANTOM : - kindString = "REMOVED_PHANTOM"; //$NON-NLS-1$ + kindString = "REMOVED_PHANTOM"; break; case IResourceDelta.REPLACED : - kindString = "REPLACED"; //$NON-NLS-1$ + kindString = "REPLACED"; break; case IResourceDelta.SYNC : - kindString = "SYNC"; //$NON-NLS-1$ + kindString = "SYNC"; break; case IResourceDelta.TYPE : - kindString = "TYPE"; //$NON-NLS-1$ + kindString = "TYPE"; break; } return kindString; @@ -504,23 +505,23 @@ public class SystemResourceListener implements IResourceChangeListener, Runnable public static String getTypeString(int type) { - String typeString = "Unknown: " + Integer.toString(type); //$NON-NLS-1$ + String typeString = "Unknown: " + Integer.toString(type); switch (type) { case IResourceChangeEvent.POST_CHANGE : - typeString = "POST_CHANGE"; //$NON-NLS-1$ + typeString = "POST_CHANGE"; break; case IResourceChangeEvent.POST_BUILD: - typeString = "POST_BUILD"; //$NON-NLS-1$ + typeString = "POST_BUILD"; break; case IResourceChangeEvent.PRE_DELETE : - typeString = "PRE_DELETE"; //$NON-NLS-1$ + typeString = "PRE_DELETE"; break; case IResourceChangeEvent.PRE_CLOSE : - typeString = "PRE_CLOSE"; //$NON-NLS-1$ + typeString = "PRE_CLOSE"; break; case IResourceChangeEvent.PRE_BUILD : - typeString = "PRE_BUILD"; //$NON-NLS-1$ + typeString = "PRE_BUILD"; break; } return typeString; @@ -670,8 +671,8 @@ public class SystemResourceListener implements IResourceChangeListener, Runnable } else if (runAction == FIRE_EVENT) { - RSEUIPlugin.getTheSystemRegistry().fireEvent( - new SystemModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ALL_RELOADED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_ALL, "dummy")); //$NON-NLS-1$ + ((SystemRegistry)RSEUIPlugin.getTheSystemRegistry()).fireEvent( + new SystemModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ALL_RELOADED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_ALL, "dummy")); } } diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceManager.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceManager.java index 23fb986e00d..88336e62c72 100644 --- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceManager.java +++ b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceManager.java @@ -27,13 +27,13 @@ import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResourceChangeEvent; import org.eclipse.core.resources.IResourceChangeListener; import org.eclipse.core.resources.IWorkspace; +import org.eclipse.rse.core.filters.ISystemFilterPool; +import org.eclipse.rse.core.filters.ISystemFilterPoolManager; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.ISystemHostPool; +import org.eclipse.rse.core.model.ISystemProfile; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; -import org.eclipse.rse.filters.ISystemFilterPool; -import org.eclipse.rse.filters.ISystemFilterPoolManager; import org.eclipse.rse.internal.model.SystemProfileManager; -import org.eclipse.rse.model.IHost; -import org.eclipse.rse.model.ISystemHostPool; -import org.eclipse.rse.model.ISystemProfile; /**