From 84e14e782ecbf1438ccf2f0ff04255ae5269a045 Mon Sep 17 00:00:00 2001 From: David Dykstal Date: Wed, 12 Apr 2006 16:47:19 +0000 Subject: [PATCH] Changes since initial population. Bringing support up to Eclipse M6 level. Significant refactoring. --- .../dstore/core/client/ClientConnection.java | 256 ++++++++----- .../eclipse/dstore/core/model/DataStore.java | 16 +- .../core/model/IDataStoreConstants.java | 28 ++ .../dstore/core/server/ServerLauncher.java | 9 +- .../core/util/ssl/DataStoreTrustManager.java | 2 +- .../META-INF/MANIFEST.MF | 3 +- .../connectorservice/dstore/Activator.java | 12 +- .../dstore/DStoreConnectorService.java | 345 ++++++++++++++---- .../dstore/RexecDstoreServer.java | 22 +- .../dstore/util/ConnectionStatusListener.java | 18 +- .../dstore/util/StatusMonitor.java | 2 +- rse/plugins/org.eclipse.rse.core/.classpath | 1 + .../org.eclipse.rse.core/META-INF/MANIFEST.MF | 21 +- .../org.eclipse.rse.core/build.properties | 5 + rse/plugins/org.eclipse.rse.core/plugin.xml | 6 + .../schema/systemTypes.exsd | 112 ++++++ .../eclipse/rse/core/IRSECoreRegistry.java | 46 +++ .../org/eclipse/rse/core/IRSESystemType.java} | 49 ++- .../org/eclipse/rse/core/RSECorePlugin.java | 68 ++++ .../rse/core/internal/RSECoreRegistry.java | 151 ++++++++ .../rse/core/internal/RSESystemType.java | 120 ++++++ .../security/UniversalKeystoreProvider.java | 10 +- .../UniversalSecurityPreferencePage.java | 4 +- .../wizards/SystemImportCertAction.java | 7 +- .../wizards/SystemImportCertWizard.java | 8 +- .../SystemImportCertWizardAliasPage.java | 37 +- .../rse/eclipse/filesystem/RSEFileSystem.java | 4 +- .../META-INF/MANIFEST.MF | 3 +- .../ui/SystemFileFilterStringEditPane.java | 34 +- .../ui/actions/SystemAddToArchiveAction.java | 14 +- .../files/ui/actions/SystemCombineAction.java | 12 +- .../files/ui/actions/SystemConvertAction.java | 18 +- .../actions/SystemCopyRemoteFileAction.java | 24 +- .../ui/actions/SystemCreateEditActions.java | 4 +- .../actions/SystemDoubleClickEditAction.java | 4 +- .../actions/SystemDownloadConflictAction.java | 6 +- .../actions/SystemEditFileInPlaceAction.java | 6 +- .../actions/SystemEditFilePlatformAction.java | 6 +- .../SystemEditProjectFileLineAction.java | 4 +- .../files/ui/actions/SystemExtractAction.java | 16 +- .../ui/actions/SystemExtractToAction.java | 34 +- .../actions/SystemMoveRemoteFileAction.java | 22 +- .../files/ui/actions/SystemNewFileAction.java | 4 +- .../ui/actions/SystemNewFileFilterAction.java | 14 +- .../SystemNewFileFilterFromFolderAction.java | 4 +- .../ui/actions/SystemNewFolderAction.java | 4 +- .../SystemRemoteFileLineOpenWithMenu.java | 4 +- .../actions/SystemRemoteFileOpenWithMenu.java | 4 +- .../actions/SystemRemoteFileSelectAction.java | 4 +- .../files/ui/actions/SystemSearchAction.java | 6 +- .../actions/SystemSelectRemoteFileAction.java | 4 +- .../SystemSelectRemoteFolderAction.java | 4 +- .../actions/SystemUploadConflictAction.java | 10 +- .../SystemPromptForHomeFolderDialog.java | 4 +- .../SystemSelectRemoteFileOrFolderDialog.java | 2 +- .../FileServicesPropertyPage.java | 4 +- .../SystemCachePreferencePage.java | 22 +- .../propertypages/SystemFilePropertyPage.java | 10 +- .../UniversalPreferencePage.java | 38 +- .../ui/resources/AddToArchiveDialog.java | 12 +- .../rse/files/ui/resources/CombineDialog.java | 10 +- .../rse/files/ui/resources/CombineForm.java | 8 +- .../files/ui/resources/ExtractToDialog.java | 6 +- .../rse/files/ui/resources/ExtractToForm.java | 12 +- .../rse/files/ui/resources/SaveAsForm.java | 4 +- .../resources/SystemEditableRemoteFile.java | 30 +- .../ui/resources/SystemIFileProperties.java | 4 +- .../ui/resources/SystemRemoteEditManager.java | 10 +- ...SystemRemoteMarkerTypeDefinitionCache.java | 4 +- .../ui/resources/SystemTempFileListener.java | 20 +- .../SystemUniversalTempFileListener.java | 8 +- .../UniversalFileTransferUtility.java | 36 +- .../rse/files/ui/search/SystemSearchPage.java | 12 +- .../RemoteFileSubSystemFactoryAdapter.java | 4 +- .../ui/view/SystemViewRemoteFileAdapter.java | 56 +-- .../SystemViewRemoteSearchResultAdapter.java | 8 +- ...ystemViewRemoteSearchResultSetAdapter.java | 12 +- .../SystemEnterOrSelectRemoteFileForm.java | 4 +- .../SystemQualifiedRemoteFolderCombo.java | 24 +- .../widgets/SystemRemoteConnectionCombo.java | 10 +- .../ui/widgets/SystemRemoteFolderCombo.java | 4 +- .../SystemSelectRemoteFileOrFolderForm.java | 16 +- .../widgets/SystemSelectRemoteFilesForm.java | 8 +- .../files/ui/wizards/SystemNewFileWizard.java | 30 +- .../wizards/SystemNewFileWizardMainPage.java | 4 +- .../ui/wizards/SystemNewFolderWizard.java | 24 +- .../SystemNewFolderWizardMainPage.java | 6 +- .../org.eclipse.rse.processes.ui/plugin.xml | 4 +- .../ui/SystemProcessFilterStringEditPane.java | 4 +- .../ui/actions/SystemKillProcessAction.java | 12 +- .../actions/SystemNewProcessFilterAction.java | 10 +- .../ui/dialogs/RemoteProcessesDialog.java | 4 +- .../ui/dialogs/SystemKillTableRow.java | 4 +- .../ProcessServicesPropertyPage.java | 4 +- .../view/SystemViewRemoteProcessAdapter.java | 10 +- .../miners/UniversalServerUtilities.java | 14 +- .../serverruntime/server.linux | 10 +- .../serverruntime/server.unix | 5 +- .../serverruntime/server.zseries | 5 +- .../clientserver/SystemEncodingUtil.java | 50 ++- .../rse/shells/ui/RemoteCommandHelpers.java | 6 +- .../ui/SystemRemoteCommandEntryForm.java | 8 +- .../ui/actions/SystemCommandAction.java | 14 +- .../SystemExportShellHistoryAction.java | 6 +- .../SystemExportShellOutputAction.java | 6 +- .../actions/SystemShowInShellViewAction.java | 4 +- .../SystemTerminateRemoveShellAction.java | 6 +- .../actions/SystemTerminateShellAction.java | 8 +- .../ShellServicesPropertyPage.java | 4 +- .../SystemShellPropertyPage.java | 6 +- .../CommandEntryContentAssistProcessor.java | 6 +- .../rse/shells/ui/view/CommandsViewPage.java | 10 +- .../ShellServiceSubSystemFactoryAdapter.java | 6 +- .../ui/view/SystemBuildErrorViewPart.java | 16 +- .../shells/ui/view/SystemCommandsView.java | 194 ++++------ .../ui/view/SystemCommandsViewPart.java | 22 +- .../ui/view/SystemViewRemoteErrorAdapter.java | 4 +- .../view/SystemViewRemoteOutputAdapter.java | 36 +- .../files/core/SystemFileAPIProviderImpl.java | 4 +- .../files/core/model/RemoteFileUtility.java | 8 +- .../files/core/model/RemotePath.java | 4 +- .../model/SystemFileTransferModeRegistry.java | 10 +- .../core/servicesubsystem/OutputRefresh.java | 4 +- .../files/core/subsystems/RemoteFile.java | 6 +- .../RemoteFileCancelledException.java | 4 +- .../subsystems/RemoteFileIOException.java | 4 +- .../RemoteFileSecurityException.java | 4 +- .../core/subsystems/RemoteFileSubSystem.java | 8 +- .../RemoteFileSubSystemConfiguration.java | 2 +- .../RemoteFolderNotEmptyException.java | 4 +- .../core/util/ValidatorFileFilterString.java | 12 +- .../core/util/ValidatorFileUniqueName.java | 12 +- .../plugin.xml | 6 +- .../files/dstore/model/DStoreFileAdapter.java | 4 +- .../files/dstore/old/DownloadListener.java | 4 +- .../old/SearchResultsChangeListener.java | 10 +- .../RemoteFilePropertyChangeListener.java | 4 +- .../plugin.xml | 2 +- .../files/ftp/model/FTPFileAdapter.java | 4 +- .../plugin.xml | 2 +- .../LocalFileSubSystemConfiguration.java | 2 +- .../files/local/model/LocalFileAdapter.java | 4 +- .../plugin.xml | 2 +- .../plugin.xml | 2 +- .../META-INF/MANIFEST.MF | 3 +- .../servicesubsystem/OutputRefreshJob.java | 4 +- .../shells/subsystems/CandidateCommand.java | 2 +- .../shells/subsystems/RemoteCmdSubSystem.java | 24 +- .../RemoteCmdSubSystemConfiguration.java | 4 +- .../shells/subsystems/RemoteCommandShell.java | 4 +- .../model/RemoteCommandShellOperation.java | 6 +- .../core/model/SimpleCommandOperation.java | 5 + .../ShellServiceSubSystem.java | 6 +- .../plugin.xml | 2 +- .../DStoreShellSubSystemConfiguration.java | 2 +- .../plugin.xml | 2 +- .../org.eclipse.rse.ui/META-INF/MANIFEST.MF | 5 +- .../rse/internal/ui/view/SystemView.java | 38 +- .../UI/org/eclipse/rse/ui/IRSEAdapter.java | 39 ++ .../rse/ui/IRSESystemTypeConstants.java | 23 ++ .../UI/org/eclipse/rse/ui/IRSEUIRegistry.java | 20 + .../org/eclipse/rse/ui/ISystemMessages.java | 4 + .../rse/ui/ISystemPreferencesConstants.java | 11 +- .../UI/org/eclipse/rse/ui/RSEAdapter.java | 49 +++ .../eclipse/rse/ui/RSESystemTypeAdapter.java | 172 +++++++++ .../org/eclipse/rse/ui/RSEUIPlugin.java} | 149 ++++---- .../eclipse/rse/ui/SystemConnectionForm.java | 41 ++- .../org/eclipse/rse/ui/SystemProfileForm.java | 3 +- .../org/eclipse/rse/ui/SystemResources.java | 20 +- .../eclipse/rse/ui/SystemResources.properties | 19 +- .../eclipse/rse/ui/SystemWidgetHelpers.java | 8 +- .../DisplayHidableSystemMessageAction.java | 47 +++ .../actions/DisplaySystemMessageAction.java | 4 +- .../ISystemDynamicPopupMenuExtension.java | 4 +- .../rse/ui/actions/SystemBaseCopyAction.java | 26 +- .../SystemCascadingPreferencesAction.java | 6 +- .../SystemCascadingPulldownMenuAction.java | 4 +- .../SystemCascadingRemoteServersAction.java | 4 +- ...temCascadingUserIdPerSystemTypeAction.java | 69 ---- .../SystemClearAllPasswordsAction.java | 4 +- .../ui/actions/SystemClearPasswordAction.java | 6 +- .../rse/ui/actions/SystemCollapseAction.java | 6 +- .../ui/actions/SystemCollapseAllAction.java | 10 +- .../ui/actions/SystemCommonDeleteAction.java | 10 +- .../ui/actions/SystemCommonRenameAction.java | 6 +- .../actions/SystemCommonSelectAllAction.java | 4 +- .../rse/ui/actions/SystemConnectAction.java | 8 +- .../SystemConnectAllSubSystemsAction.java | 6 +- .../actions/SystemCopyConnectionAction.java | 20 +- .../actions/SystemCopyToClipboardAction.java | 6 +- .../ui/actions/SystemDisconnectAction.java | 4 +- .../SystemDisconnectAllSubSystemsAction.java | 6 +- ...ystemDynamicPopupMenuExtensionManager.java | 6 +- .../rse/ui/actions/SystemExpandAction.java | 6 +- .../actions/SystemMoveConnectionAction.java | 18 +- .../SystemMoveDownConnectionAction.java | 10 +- .../actions/SystemMoveUpConnectionAction.java | 10 +- .../ui/actions/SystemNewConnectionAction.java | 6 +- ...onnectionFromExistingConnectionAction.java | 4 +- .../ui/actions/SystemNewProfileAction.java | 10 +- .../SystemOpenExplorerPerspectiveAction.java | 6 +- .../SystemPasteFromClipboardAction.java | 20 +- ...referenceQualifyConnectionNamesAction.java | 8 +- .../SystemPreferenceRestoreStateAction.java | 8 +- ...SystemPreferenceShowFilterPoolsAction.java | 6 +- ...emPreferenceUserIdPerSystemTypeAction.java | 83 ----- .../actions/SystemProfileNameCopyAction.java | 14 +- .../SystemProfileNameSelectAction.java | 6 +- .../rse/ui/actions/SystemRefreshAction.java | 8 +- .../ui/actions/SystemRefreshAllAction.java | 6 +- .../SystemRemoteServerStartAction.java | 4 +- .../actions/SystemRemoteServerStopAction.java | 4 +- .../rse/ui/actions/SystemRunAction.java | 6 +- .../actions/SystemSelectConnectionAction.java | 4 +- .../ui/actions/SystemShowInMonitorAction.java | 4 +- .../ui/actions/SystemShowInTableAction.java | 4 +- .../SystemShowPreferencesPageAction.java | 4 +- ...SystemStartCommunicationsDaemonAction.java | 4 +- .../ui/actions/SystemTeamReloadAction.java | 8 +- .../ui/actions/SystemWorkOfflineAction.java | 10 +- .../actions/SystemWorkWithProfilesAction.java | 6 +- .../EnvironmentVariablesPromptDialog.java | 12 +- .../dialogs/SystemChangePasswordDialog.java | 217 +++++++++++ .../ui/dialogs/SystemCopyProfileDialog.java | 14 +- .../rse/ui/dialogs/SystemDeleteDialog.java | 4 +- .../rse/ui/dialogs/SystemDeleteTableRow.java | 6 +- ...a => SystemPasswordPersistencePrompt.java} | 42 +-- .../dialogs/SystemPasswordPromptDialog.java | 10 +- .../rse/ui/dialogs/SystemPromptDialog.java | 75 +++- .../rse/ui/dialogs/SystemRenameDialog.java | 18 +- .../ui/dialogs/SystemRenameSingleDialog.java | 31 +- .../ui/dialogs/SystemRenameTableProvider.java | 2 +- .../dialogs/SystemSelectAnythingDialog.java | 4 +- .../dialogs/SystemSelectConnectionDialog.java | 4 +- .../dialogs/SystemSimpleContentElement.java | 4 +- .../ui/dialogs/SystemSimpleCopyDialog.java | 6 +- .../dialogs/SystemTestFilterStringDialog.java | 4 +- .../dialogs/SystemUpdateConnectionDialog.java | 6 +- .../SystemUserIdPerSystemTypeDialog.java | 243 ------------ .../rse/ui/dialogs/SystemWizardDialog.java | 8 +- .../dialogs/SystemWorkWithHistoryDialog.java | 4 +- .../ui/filters/SystemChangeFilterPane.java | 12 +- .../filters/SystemFilterStringEditPane.java | 4 +- .../rse/ui/filters/SystemFilterUIHelpers.java | 8 +- .../actions/SystemChangeFilterAction.java | 8 +- .../SystemChangeFilterActionCopyString.java | 4 +- .../SystemChangeFilterActionDeleteString.java | 4 +- ...ystemChangeFilterActionMoveStringDown.java | 6 +- .../SystemChangeFilterActionMoveStringUp.java | 6 +- .../SystemChangeFilterActionPasteString.java | 4 +- ...CascadingNewFilterPoolReferenceAction.java | 4 +- .../actions/SystemFilterCopyFilterAction.java | 6 +- .../SystemFilterCopyFilterPoolAction.java | 8 +- .../SystemFilterCopyFilterStringAction.java | 8 +- .../SystemFilterMoveDownFilterAction.java | 4 +- ...lterMoveDownFilterPoolReferenceAction.java | 4 +- .../actions/SystemFilterMoveFilterAction.java | 6 +- .../SystemFilterMoveFilterPoolAction.java | 8 +- .../SystemFilterMoveFilterStringAction.java | 8 +- .../SystemFilterMoveUpFilterAction.java | 4 +- ...FilterMoveUpFilterPoolReferenceAction.java | 4 +- .../SystemFilterNewFilterPoolAction.java | 4 +- ...SystemFilterPoolReferenceSelectAction.java | 4 +- ...FilterRemoveFilterPoolReferenceAction.java | 4 +- .../SystemFilterSelectFilterPoolsAction.java | 16 +- ...SystemFilterWorkWithFilterPoolsAction.java | 18 +- ...erWorkWithFilterPoolsRefreshAllAction.java | 4 +- .../actions/SystemNewFilterAction.java | 6 +- .../dialogs/SystemChangeFilterDialog.java | 4 +- .../SystemFilterNewFilterPoolWizard.java | 8 +- ...SystemFilterWorkWithFilterPoolsDialog.java | 18 +- .../dialogs/SystemNewFilterWizard.java | 10 +- .../SystemNewFilterWizardConfigurator.java | 6 +- .../dialogs/SystemUnNamedFilterDialog.java | 2 +- .../internal/RSESystemTypeAdapterFactory.java | 42 +++ .../rse/ui/internal/RSEUIRegistry.java | 51 +++ .../messages/SystemDialogPageMessageLine.java | 4 +- .../rse/ui/messages/SystemMessageDialog.java | 97 ++++- .../rse/ui/messages/SystemMessageLine.java | 8 +- .../rse/ui/open/SystemQuickOpenUtil.java | 4 +- .../operations/SystemJobRunnableContext.java | 4 +- ...ctSystemSubSystemPropertyPageCoreForm.java | 4 +- .../RemoteSystemsPreferencePage.java | 102 +++--- .../ServerConnectionSecurityPropertyPage.java | 47 +-- .../propertypages/SignonPreferencePage.java | 20 +- .../SystemChangeFilterPropertyPage.java | 6 +- .../SystemCommunicationsPreferencePage.java | 10 +- .../SystemConnectionPropertyPage.java | 12 +- ...ystemConnectionSubSystemsPropertyPage.java | 8 +- .../SystemFilterPoolPropertyPage.java | 4 +- ...SystemFilterPoolReferencePropertyPage.java | 4 +- .../SystemFilterPropertyPage.java | 4 +- .../SystemFilterStringPropertyPage.java | 6 +- .../SystemLoggingPreferencePage.java | 4 +- .../SystemPreferenceInitializer.java | 4 +- .../SystemRemotePropertyPageNode.java | 4 +- .../SystemSubSystemPropertyPageCore.java | 4 +- .../SystemSubSystemPropertyPageCoreForm.java | 6 +- .../SystemTeamViewProfilePropertyPage.java | 4 +- .../propertypages/SystemTypeFieldEditor.java | 50 +-- .../ui/validators/ValidatorArchiveName.java | 4 +- .../ValidatorCompileCommandLabel.java | 10 +- .../validators/ValidatorConnectionName.java | 14 +- .../rse/ui/validators/ValidatorFileName.java | 22 +- .../ui/validators/ValidatorFilterName.java | 8 +- .../validators/ValidatorFilterPoolName.java | 8 +- .../ui/validators/ValidatorFilterString.java | 10 +- .../ui/validators/ValidatorFolderName.java | 22 +- .../ui/validators/ValidatorIntegerInput.java | 6 +- .../ValidatorIntegerRangeInput.java | 8 +- .../rse/ui/validators/ValidatorLongInput.java | 6 +- .../validators/ValidatorLongRangeInput.java | 8 +- .../rse/ui/validators/ValidatorPathName.java | 10 +- .../rse/ui/validators/ValidatorPortInput.java | 14 +- .../ui/validators/ValidatorProfileName.java | 10 +- .../validators/ValidatorServerPortInput.java | 6 +- .../ui/validators/ValidatorSourceType.java | 10 +- .../ui/validators/ValidatorSpecialChar.java | 8 +- .../ui/validators/ValidatorSystemName.java | 22 +- .../ui/validators/ValidatorUniqueString.java | 12 +- .../ValidatorUserActionCommand.java | 6 +- .../ValidatorUserActionComment.java | 6 +- .../validators/ValidatorUserActionName.java | 10 +- .../rse/ui/validators/ValidatorUserId.java | 4 +- .../ui/validators/ValidatorUserTypeName.java | 10 +- .../ui/validators/ValidatorUserTypeTypes.java | 6 +- .../ui/view/AbstractSystemViewAdapter.java | 12 +- .../rse/ui/view/ISystemDragDropAdapter.java | 7 +- .../rse/ui/view/SubsystemFactoryAdapter.java | 68 ++-- .../ui/view/SystemAbstractAPIProvider.java | 10 +- .../ui/view/SystemDNDTransferRunnable.java | 10 +- .../rse/ui/view/SystemDropActionDelegate.java | 8 +- .../ui/view/SystemResourceSelectionForm.java | 4 +- .../SystemResourceSelectionInputProvider.java | 4 +- ...stemSelectRemoteObjectAPIProviderImpl.java | 2 +- .../rse/ui/view/SystemTableTreeView.java | 22 +- .../eclipse/rse/ui/view/SystemTableView.java | 30 +- .../rse/ui/view/SystemTableViewPart.java | 34 +- ...SystemTestFilterStringAPIProviderImpl.java | 8 +- .../org/eclipse/rse/ui/view/SystemView.java | 38 +- ...SystemViewAPIProviderForFilterStrings.java | 8 +- .../view/SystemViewAPIProviderForFilters.java | 18 +- .../ui/view/SystemViewConnectionAdapter.java | 75 ++-- ...mViewConnectionSelectionInputProvider.java | 6 +- .../ui/view/SystemViewDataDragAdapter.java | 16 +- .../ui/view/SystemViewDataDropAdapter.java | 18 +- .../rse/ui/view/SystemViewFilterAdapter.java | 12 +- .../ui/view/SystemViewFilterPoolAdapter.java | 6 +- .../SystemViewFilterPoolReferenceAdapter.java | 6 +- .../SystemViewFilterReferenceAdapter.java | 22 +- .../view/SystemViewFilterStringAdapter.java | 6 +- .../SystemViewLabelAndContentProvider.java | 4 +- .../rse/ui/view/SystemViewMessageAdapter.java | 14 +- .../SystemViewNewConnectionPromptAdapter.java | 4 +- .../eclipse/rse/ui/view/SystemViewPart.java | 39 +- .../ui/view/SystemViewScratchpadAdapter.java | 4 +- .../ui/view/SystemViewSubSystemAdapter.java | 14 +- .../rse/ui/view/monitor/ClearAction.java | 4 +- .../ui/view/monitor/ClearSelectedAction.java | 4 +- .../rse/ui/view/monitor/MonitorViewPage.java | 10 +- .../view/monitor/SystemMonitorViewPart.java | 20 +- .../rse/ui/view/scratchpad/BrowseAction.java | 4 +- .../rse/ui/view/scratchpad/ClearAction.java | 6 +- .../view/scratchpad/ClearSelectedAction.java | 6 +- .../view/scratchpad/SystemScratchpadView.java | 22 +- .../scratchpad/SystemScratchpadViewPart.java | 8 +- .../SystemSearchClearHistoryAction.java | 4 +- .../SystemSearchRemoveAllMatchesAction.java | 4 +- ...stemSearchRemoveSelectedMatchesAction.java | 4 +- .../ui/view/search/SystemSearchTableView.java | 4 +- .../ui/view/search/SystemSearchViewPart.java | 16 +- .../rse/ui/view/team/SystemTeamView.java | 8 +- .../SystemTeamViewActiveProfileAction.java | 8 +- .../team/SystemTeamViewCategoryAdapter.java | 8 +- .../team/SystemTeamViewContentProvider.java | 6 +- .../team/SystemTeamViewLabelProvider.java | 10 +- ...SystemTeamViewMakeActiveProfileAction.java | 8 +- ...stemTeamViewMakeInActiveProfileAction.java | 8 +- .../rse/ui/view/team/SystemTeamViewPart.java | 19 +- .../team/SystemTeamViewProfileAdapter.java | 40 +- .../team/SystemTeamViewRefreshAllAction.java | 6 +- ...SystemTeamViewSubSystemFactoryAdapter.java | 4 +- .../ui/widgets/EnvironmentVariablesForm.java | 10 +- .../ui/widgets/IBMBaseServerLauncherForm.java | 4 +- .../rse/ui/widgets/IBMServerLauncherForm.java | 61 +++- .../rse/ui/widgets/InheritControl.java | 4 +- .../org/eclipse/rse/ui/widgets/SSLForm.java | 41 ++- .../widgets/ServerConnectionSecurityForm.java | 23 +- .../widgets/SystemEditPaneStateMachine.java | 4 +- .../rse/ui/widgets/SystemHostCombo.java | 22 +- .../rse/ui/widgets/SystemPortPrompt.java | 4 +- .../widgets/SystemSelectConnectionForm.java | 4 +- .../services/ConnectorServiceElement.java | 4 +- .../services/PropertySetServiceElement.java | 4 +- ...erverLauncherPropertiesServiceElement.java | 4 +- .../services/ServiceServiceElement.java | 4 +- .../rse/ui/wizards/AbstractSystemWizard.java | 4 +- .../ui/wizards/AbstractSystemWizardPage.java | 4 +- .../wizards/SubSystemServiceWizardPage.java | 4 +- .../ui/wizards/SystemNewConnectionWizard.java | 18 +- ...temNewConnectionWizardDefaultMainPage.java | 4 +- ...mNewConnectionWizardRenameProfilePage.java | 6 +- .../ui/wizards/SystemNewProfileWizard.java | 6 +- .../SystemNewProfileWizardMainPage.java | 10 +- .../filters/ISystemFilterNamingPolicy.java | 2 +- .../rse/internal/filters/SystemFilter.java | 6 +- .../SystemFilterContainerCommonMethods.java | 2 +- .../internal/filters/SystemFilterPool.java | 12 +- .../filters/SystemFilterPoolManager.java | 26 +- .../filters/SystemFilterPoolReference.java | 2 +- .../internal/filters/SystemFilterString.java | 4 +- .../org/eclipse/rse/internal/model/Host.java | 18 +- .../rse/internal/model/SystemHostPool.java | 16 +- .../SystemNewConnectionPromptObject.java | 24 +- .../rse/internal/model/SystemProfile.java | 10 +- .../internal/model/SystemProfileManager.java | 24 +- .../rse/internal/model/SystemRegistry.java | 113 +++--- .../eclipse/rse/model/ISystemHostPool.java | 2 +- .../eclipse/rse/model/ISystemRegistry.java | 16 +- .../rse/model/SystemSignonInformation.java | 6 +- .../eclipse/rse/model/SystemStartHere.java | 8 +- .../persistence/RSEPersistenceManager.java | 94 +++-- .../persistence/dom/RSEDOMExporter.java | 2 +- .../persistence/dom/RSEDOMImporter.java | 8 +- .../persistence/IRSEPersistenceManager.java | 8 +- .../persistence/IRSEPersistenceProvider.java | 2 +- .../rse/persistence/PropertyFileProvider.java | 98 +++++ ...Provider.java => SerializingProvider.java} | 6 +- .../rse/persistence/dom/IRSEDOMExporter.java | 2 +- rse/plugins/org.eclipse.rse.ui/plugin.xml | 130 +++---- .../SystemPersistableReferenceManager.java | 4 +- ...stemPersistableReferencedObjectHelper.java | 2 +- .../schema/persistenceProviders.exsd | 4 +- .../schema/rseConfigDefaults.exsd | 4 +- .../schema/subsystemConfiguration.exsd | 6 +- .../org.eclipse.rse.ui/schema/systemtype.exsd | 17 +- .../IBMServerLauncherConstants.java | 6 +- .../internal/subsystems/ServerLauncher.java | 4 +- .../SubSystemConfigurationProxy.java | 18 +- .../subsystems/AbstractConnectorService.java | 84 ++++- .../AbstractConnectorServiceManager.java | 4 +- .../core/subsystems/IBMServerLauncher.java | 2 +- .../subsystems/ISubSystemConfiguration.java | 4 +- .../ISubSystemConfigurationProxy.java | 18 +- .../rse/core/subsystems/SubSystem.java | 114 +++--- .../subsystems/SubSystemConfiguration.java | 102 +++--- .../org.eclipse.rse.ui/systemmessages.xml | 13 + .../eclipse/rse/core/ISystemViewSupplier.java | 2 +- .../rse/core/PasswordPersistenceManager.java | 19 +- .../rse/core/SystemAdapterHelpers.java | 3 +- .../eclipse/rse/core/SystemBasePlugin.java | 45 ++- .../SystemPopupMenuActionContributor.java | 4 +- .../rse/core/SystemPreferencesManager.java | 11 +- .../rse/core/SystemPropertyPageExtension.java | 15 +- .../SystemPropertyPageExtensionManager.java | 3 +- .../rse/core/SystemRemoteObjectMatcher.java | 8 +- .../rse/core/SystemResourceHelpers.java | 4 +- .../rse/core/SystemResourceListener.java | 15 +- .../rse/core/SystemResourceManager.java | 2 +- .../org/eclipse/rse/core/SystemType.java | 199 ---------- .../core/comm/ISystemKeystoreProvider.java | 2 +- .../core/comm/SystemCommunicationsDaemon.java | 8 +- 462 files changed, 4756 insertions(+), 3306 deletions(-) create mode 100644 rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreConstants.java create mode 100644 rse/plugins/org.eclipse.rse.core/build.properties create mode 100644 rse/plugins/org.eclipse.rse.core/plugin.xml create mode 100644 rse/plugins/org.eclipse.rse.core/schema/systemTypes.exsd create mode 100644 rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSECoreRegistry.java rename rse/plugins/{org.eclipse.rse.ui/systems/org/eclipse/rse/core/ISystemTypes.java => org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemType.java} (58%) create mode 100644 rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java create mode 100644 rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSECoreRegistry.java create mode 100644 rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSESystemType.java create mode 100644 rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRSEAdapter.java create mode 100644 rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRSESystemTypeConstants.java create mode 100644 rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRSEUIRegistry.java create mode 100644 rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEAdapter.java create mode 100644 rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSESystemTypeAdapter.java rename rse/plugins/org.eclipse.rse.ui/{systems/org/eclipse/rse/core/SystemPlugin.java => UI/org/eclipse/rse/ui/RSEUIPlugin.java} (94%) create mode 100644 rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayHidableSystemMessageAction.java delete mode 100644 rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingUserIdPerSystemTypeAction.java delete mode 100644 rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceUserIdPerSystemTypeAction.java create mode 100644 rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemChangePasswordDialog.java rename rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/{SystemPasswordPersistancePrompt.java => SystemPasswordPersistencePrompt.java} (84%) delete mode 100644 rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemUserIdPerSystemTypeDialog.java create mode 100644 rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/internal/RSESystemTypeAdapterFactory.java create mode 100644 rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/internal/RSEUIRegistry.java create mode 100644 rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/PropertyFileProvider.java rename rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/{DefaultRSEPersistenceProvider.java => SerializingProvider.java} (96%) delete mode 100644 rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemType.java diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientConnection.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientConnection.java index daac64734f7..baf748d5ba8 100644 --- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientConnection.java +++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientConnection.java @@ -19,6 +19,7 @@ package org.eclipse.dstore.core.client; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; +import java.io.InterruptedIOException; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.net.Socket; @@ -37,6 +38,7 @@ import org.eclipse.dstore.core.model.DE; import org.eclipse.dstore.core.model.DataElement; import org.eclipse.dstore.core.model.DataStore; import org.eclipse.dstore.core.model.DataStoreAttributes; +import org.eclipse.dstore.core.model.IDataStoreConstants; import org.eclipse.dstore.core.model.ISSLProperties; import org.eclipse.dstore.core.server.ServerCommandHandler; import org.eclipse.dstore.core.server.ServerLauncher; @@ -67,7 +69,7 @@ import org.eclipse.dstore.extra.internal.extra.DomainNotifier; * * */ -public class ClientConnection +public class ClientConnection implements IDataStoreConstants { @@ -91,6 +93,7 @@ public class ClientConnection private String _host; private String _port; private String _hostDirectory; + private Socket _launchSocket; private DataStoreTrustManager _trustManager; @@ -103,6 +106,7 @@ public class ClientConnection private static final int HANDSHAKE_SERVER_NEWER = 4; private static final int HANDSHAKE_SERVER_RECENT_OLDER = 5; private static final int HANDSHAKE_SERVER_RECENT_NEWER = 6; + private static final int HANDSHAKE_TIMEOUT = 7; private static final int VERSION_INDEX_PROTOCOL = 0; private static final int VERSION_INDEX_VERSION = 1; @@ -112,6 +116,7 @@ public class ClientConnection public static String SERVER_OLDER = "Older DataStore Server."; public static String CLIENT_OLDER = "Older DataStore Client."; public static String INCOMPATIBLE_PROTOCOL = "Incompatible Protocol."; + public static String CANNOT_CONNECT = "Cannot connect to server."; /** * Creates a new ClientConnection instance @@ -431,7 +436,7 @@ public class ClientConnection */ public ConnectionStatus connect(String ticket) { - return connect(ticket, -1); + return connect(ticket, 0); } public ConnectionStatus connect(String ticket, int timeout) @@ -446,7 +451,13 @@ public class ClientConnection port = Integer.parseInt(_port); } - if (_dataStore.usingSSL()) + if (!_dataStore.usingSSL()) + { + _theSocket = new Socket(_host, port); + if (doTimeOut && (_theSocket != null)) + _theSocket.setSoTimeout(timeout); + } + else { String location = _dataStore.getKeyStoreLocation(); String pw = _dataStore.getKeyStorePassword(); @@ -477,12 +488,6 @@ public class ClientConnection return result; } } - else - { - _theSocket = new Socket(_host, port); - if (doTimeOut && (_theSocket != null)) - _theSocket.setSoTimeout(timeout); - } String msg = null; int handshakeResult = doHandShake(); @@ -521,7 +526,8 @@ public class ClientConnection } case HANDSHAKE_INCORRECT: { - msg = INCOMPATIBLE_PROTOCOL; + msg = CANNOT_CONNECT; + msg += INCOMPATIBLE_PROTOCOL; msg += "\nThe server running on " + _host + " under port " @@ -531,9 +537,16 @@ public class ClientConnection } case HANDSHAKE_UNEXPECTED: { - msg = "Unexpected exception"; + msg = CANNOT_CONNECT; + msg += "Unexpected exception."; break; } + case HANDSHAKE_TIMEOUT: + { + msg = CANNOT_CONNECT; + msg += "Timeout waiting for socket activity."; + break; + } default: break; } @@ -615,78 +628,44 @@ public class ClientConnection */ public ConnectionStatus launchServer(String user, String password, int daemonPort) { - ConnectionStatus result = null; + return launchServer(user, password, daemonPort, 0); + } + + public ConnectionStatus launchServer(String user, String password, int daemonPort, int timeout) + { + ConnectionStatus result = connectDaemon(daemonPort); + boolean doTimeOut = timeout > 0; + if (!result.isConnected()) { + return result; + } try { - Socket launchSocket = null; - if (_dataStore.usingSSL()) - { - try - { - String location = _dataStore.getKeyStoreLocation(); - String pw = _dataStore.getKeyStorePassword(); - DataStoreTrustManager mgr = getTrustManager(); - SSLContext context = DStoreSSLContext.getClientSSLContext(location, pw, mgr); - - try - { - SocketFactory factory = context.getSocketFactory(); - SSLSocket lSocket = (SSLSocket) factory.createSocket(_host, daemonPort); - launchSocket = lSocket; - - lSocket.startHandshake(); - - SSLSession session = lSocket.getSession(); - if (session == null) - { - System.out.println("handshake failed"); - lSocket.close(); - } - } - catch (SSLHandshakeException e) - { - - result = new ConnectionStatus(false, e, true, mgr.getUntrustedCerts()); - return result; - } - catch (Exception e) - { - if (launchSocket != null) - { - launchSocket.close(); - } - e.printStackTrace(); - result = new ConnectionStatus(false, e); - - return result; - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } - else - { - launchSocket = new Socket(_host, daemonPort); - } - PrintWriter writer = null; BufferedReader reader = null; // create output stream for server launcher try { - writer = new PrintWriter(new OutputStreamWriter(launchSocket.getOutputStream(), DE.ENCODING_UTF_8)); + if (doTimeOut) _launchSocket.setSoTimeout(timeout); + writer = new PrintWriter(new OutputStreamWriter(_launchSocket.getOutputStream(), DE.ENCODING_UTF_8)); writer.println(user); writer.println(password); writer.println(_port); writer.flush(); - reader = new BufferedReader(new InputStreamReader(launchSocket.getInputStream(), DE.ENCODING_UTF_8)); - String status = reader.readLine(); + reader = new BufferedReader(new InputStreamReader(_launchSocket.getInputStream(), DE.ENCODING_UTF_8)); + String status = null; + try + { + status = reader.readLine(); + } + catch (InterruptedIOException e) + { + result = new ConnectionStatus(false, e); + } - if (status != null && !status.equals("connected")) + + if (status != null && !status.equals(CONNECTED)) { result = new ConnectionStatus(false, status); } @@ -710,7 +689,81 @@ public class ClientConnection if (writer != null) writer.close(); - launchSocket.close(); + _launchSocket.close(); + } + catch (IOException ioe) + { + System.out.println(ioe); + ioe.printStackTrace(); + result = new ConnectionStatus(false, ioe); + } + + return result; + } + + /** + * Connect to a remote daemon + * + * @param daemonPort the port of the daemon + * @return the status of the connection + */ + public ConnectionStatus connectDaemon(int daemonPort) { + ConnectionStatus result = new ConnectionStatus(true); + try + { + _launchSocket = null; + if (_dataStore.usingSSL()) + { + try + { + String location = _dataStore.getKeyStoreLocation(); + String pw = _dataStore.getKeyStorePassword(); + DataStoreTrustManager mgr = getTrustManager(); + SSLContext context = DStoreSSLContext.getClientSSLContext(location, pw, mgr); + + try + { + SocketFactory factory = context.getSocketFactory(); + SSLSocket lSocket = (SSLSocket) factory.createSocket(_host, daemonPort); + _launchSocket = lSocket; + + lSocket.startHandshake(); + + + SSLSession session = lSocket.getSession(); + if (session == null) + { + System.out.println("handshake failed"); + lSocket.close(); + } + } + catch (SSLHandshakeException e) + { + + result = new ConnectionStatus(false, e, true, mgr.getUntrustedCerts()); + return result; + } + catch (Exception e) + { + if (_launchSocket != null) + { + _launchSocket.close(); + } + e.printStackTrace(); + result = new ConnectionStatus(false, e); + + return result; + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } + else + { + _launchSocket = new Socket(_host, daemonPort); + } } catch (java.net.ConnectException e) { @@ -731,7 +784,16 @@ public class ClientConnection return result; } - + + /** + * Reeturns the launch socket + * + * @return the launch socket + */ + public Socket getLaunchSocket() { + return _launchSocket; + } + /** * Returns the DataStore that the client is connected to. * @return the DataStore @@ -749,31 +811,50 @@ public class ClientConnection private void init(int initialSize) { _clientAttributes = new ClientAttributes(); - _clientAttributes.setAttribute(DataStoreAttributes.A_ROOT_NAME, _name); + _clientAttributes.setAttribute(ClientAttributes.A_ROOT_NAME, _name); _dataStore = new DataStore(_clientAttributes, initialSize); _dataStore.setDomainNotifier(_domainNotifier); _dataStore.createRoot(); - _host = _clientAttributes.getAttribute(DataStoreAttributes.A_HOST_NAME); - _hostDirectory = _clientAttributes.getAttribute(DataStoreAttributes.A_HOST_PATH); - _port = _clientAttributes.getAttribute(DataStoreAttributes.A_HOST_PORT); - - String[] clientVersionStr = DataStoreAttributes.DATASTORE_VERSION.split("\\."); - _clientVersion = Integer.parseInt(clientVersionStr[VERSION_INDEX_VERSION]); - _clientMinor = Integer.parseInt(clientVersionStr[VERSION_INDEX_MINOR]); + _host = _clientAttributes.getAttribute(ClientAttributes.A_HOST_NAME); + _hostDirectory = _clientAttributes.getAttribute(ClientAttributes.A_HOST_PATH); + _port = _clientAttributes.getAttribute(ClientAttributes.A_HOST_PORT); } + private void flush(DataElement object) + { + _dataStore.flush(object); + } + + private void flush() + { + _dataStore.flush(_dataStore.getHostRoot()); + _dataStore.flush(_dataStore.getLogRoot()); + _dataStore.flush(_dataStore.getDescriptorRoot()); + _dataStore.createRoot(); + } private int doHandShake() { try { BufferedReader reader = new BufferedReader(new InputStreamReader(_theSocket.getInputStream(), DE.ENCODING_UTF_8)); - - - String handshake = reader.readLine(); + PrintWriter writer = new PrintWriter(new OutputStreamWriter(_theSocket.getOutputStream(), DE.ENCODING_UTF_8)); + writer.println(""); + writer.println(""); + writer.println(""); + writer.flush(); + String handshake = null; + try + { + handshake = reader.readLine(); + } + catch (InterruptedIOException e) + { + return HANDSHAKE_TIMEOUT; + } _theSocket.setSoTimeout(0); String[] clientVersionStr = DataStoreAttributes.DATASTORE_VERSION.split("\\."); @@ -844,5 +925,14 @@ public class ClientConnection } } - + + public boolean isKnownStatus(String status) + { + return status.equals(CONNECTED) || + status.equals(AUTHENTICATION_FAILED) || + status.equals(UNKNOWN_PROBLEM) || + status.startsWith(SERVER_FAILURE) || + status.equals(PASSWORD_EXPIRED) || + status.equals(NEW_PASSWORD_INVALID); + } } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java index 7f5bb3a9a31..cd07dd7328e 100644 --- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java +++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java @@ -2977,7 +2977,7 @@ public final class DataStore * * @param root the element to persist from * @param remotePath the path where the persisted file should be saved - * @param depth the depth of persistance from the root + * @param depth the depth of persistence from the root */ public void saveFile(DataElement root, String remotePath, int depth) { @@ -3302,7 +3302,16 @@ public final class DataStore if (_userPreferencesDirectory == null) { _userPreferencesDirectory = System.getProperty("user.home"); - String userID = System.getProperty("user.name"); + + String clientUserID = System.getProperty("client.username"); + if (clientUserID == null || clientUserID.equals("")) + { + clientUserID = ""; + } + else + { + clientUserID += File.separator; + } // append a '/' if not there if ( _userPreferencesDirectory.length() == 0 || @@ -3312,13 +3321,12 @@ public final class DataStore } _userPreferencesDirectory = _userPreferencesDirectory + ".eclipse" + File.separator + - "RSE" + File.separator + userID + File.separator; + "RSE" + File.separator + clientUserID; File dirFile = new File(_userPreferencesDirectory); if (!dirFile.exists()) { dirFile.mkdirs(); } } - return _userPreferencesDirectory; } diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreConstants.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreConstants.java new file mode 100644 index 00000000000..bd05b8f4ac4 --- /dev/null +++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreConstants.java @@ -0,0 +1,28 @@ +/******************************************************************************** + * 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.dstore.core.model; + +public interface IDataStoreConstants +{ + public static final String PASSWORD_EXPIRED = "password expired"; + public static final String NEW_PASSWORD_INVALID = "new password not valid"; + public static final String AUTHENTICATION_FAILED = "Authentification Failed"; + public static final String CONNECTED = "connected"; + public static final String UNKNOWN_PROBLEM = "unknown problem connecting to server"; + public static final String SERVER_FAILURE = "server failure: "; + public static final String ATTEMPT_RECONNECT = "attempt reconnect"; +} diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLauncher.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLauncher.java index 16f151281b8..2d1d863c408 100644 --- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLauncher.java +++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLauncher.java @@ -37,6 +37,7 @@ import javax.net.ssl.SSLSession; import javax.net.ssl.SSLSocket; import org.eclipse.dstore.core.model.DE; +import org.eclipse.dstore.core.model.IDataStoreConstants; import org.eclipse.dstore.core.model.ISSLProperties; import org.eclipse.dstore.core.util.ssl.DStoreSSLContext; @@ -285,7 +286,7 @@ public class ServerLauncher extends Thread if ((launchStatus == null) || !launchStatus.equals("success")) { - _writer.println("Authentification Failed"); + _writer.println(IDataStoreConstants.AUTHENTICATION_FAILED); } else { @@ -295,7 +296,7 @@ public class ServerLauncher extends Thread if ((status != null) && status.equals(ServerReturnCodes.RC_SUCCESS)) { _errReader.readLine(); - _writer.println("connected"); + _writer.println(IDataStoreConstants.CONNECTED); _writer.println(_port); _writer.println(ticket); @@ -306,7 +307,7 @@ public class ServerLauncher extends Thread { if (status == null) { - status = new String("unknown problem connecting to server"); + status = new String(IDataStoreConstants.UNKNOWN_PROBLEM); } _writer.println(status); @@ -323,7 +324,7 @@ public class ServerLauncher extends Thread } catch (IOException e) { - _writer.println("server failure: " + e); + _writer.println(IDataStoreConstants.SERVER_FAILURE + e); } } diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/DataStoreTrustManager.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/DataStoreTrustManager.java index e861caf789f..7d15105a7d5 100644 --- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/DataStoreTrustManager.java +++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/DataStoreTrustManager.java @@ -110,7 +110,7 @@ public class DataStoreTrustManager implements X509TrustManager X509Certificate tcert = (X509Certificate)_trustedCerts.get(j); try { - tcert.verify(cert.getPublicKey()); + cert.verify(tcert.getPublicKey()); foundMatch = true; } catch (Exception e) diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.connectorservice.dstore/META-INF/MANIFEST.MF index ac209d92391..50e0aa38dca 100644 --- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/META-INF/MANIFEST.MF +++ b/rse/plugins/org.eclipse.rse.connectorservice.dstore/META-INF/MANIFEST.MF @@ -11,7 +11,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.rse.services.dstore, org.eclipse.dstore.core, org.eclipse.dstore.extra, - org.eclipse.rse.ui + org.eclipse.rse.ui, + org.eclipse.rse.core Eclipse-LazyStart: true Export-Package: org.eclipse.rse.connectorservice.dstore, org.eclipse.rse.connectorservice.dstore.util diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/Activator.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/Activator.java index 417fad38a8e..9d83a97bbd4 100644 --- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/Activator.java +++ b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/Activator.java @@ -16,7 +16,11 @@ package org.eclipse.rse.connectorservice.dstore; +import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.rse.core.SystemBasePlugin; +import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants; +import org.eclipse.rse.ui.ISystemPreferencesConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.osgi.framework.BundleContext; @@ -38,8 +42,14 @@ public class Activator extends SystemBasePlugin { /** * This method is called upon plug-in activation */ - public void start(BundleContext context) throws Exception { + public void start(BundleContext context) throws Exception + { super.start(context); + IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore(); + store.setDefault(IUniversalDStoreConstants.RESID_PREF_SOCKET_TIMEOUT, IUniversalDStoreConstants.DEFAULT_PREF_SOCKET_TIMEOUT); + store.setDefault(ISystemPreferencesConstants.ALERT_SSL, ISystemPreferencesConstants.DEFAULT_ALERT_SSL); + store.setDefault(ISystemPreferencesConstants.ALERT_NONSSL, ISystemPreferencesConstants.DEFAULT_ALERT_NON_SSL); + } /** diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java index 128fbfc1af6..15c56c54550 100644 --- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java +++ b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java @@ -33,15 +33,17 @@ import org.eclipse.dstore.core.java.RemoteClassLoader; import org.eclipse.dstore.core.model.DE; import org.eclipse.dstore.core.model.DataElement; import org.eclipse.dstore.core.model.DataStore; +import org.eclipse.dstore.core.model.IDataStoreConstants; import org.eclipse.dstore.core.model.IDataStoreProvider; import org.eclipse.dstore.core.model.ISSLProperties; +import org.eclipse.dstore.core.server.ServerLauncher; +import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.rse.connectorservice.dstore.util.ConnectionStatusListener; import org.eclipse.rse.connectorservice.dstore.util.StatusMonitor; import org.eclipse.rse.connectorservice.dstore.util.StatusMonitorFactory; -import org.eclipse.rse.core.ISystemTypes; +import org.eclipse.rse.core.IRSESystemType; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.comm.ISystemKeystoreProvider; import org.eclipse.rse.core.comm.SystemKeystoreProviderManager; import org.eclipse.rse.core.subsystems.AbstractConnectorService; @@ -58,7 +60,10 @@ import org.eclipse.rse.model.SystemSignonInformation; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.ISystemPreferencesConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemPropertyResources; +import org.eclipse.rse.ui.actions.DisplayHidableSystemMessageAction; import org.eclipse.rse.ui.actions.DisplaySystemMessageAction; import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.swt.widgets.Display; @@ -266,7 +271,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements // fall back to getting local machine ip address // this may be incorrect for the server in certain cases // like over VPN - return SystemPlugin.getLocalMachineIPAddress(); + return RSEUIPlugin.getLocalMachineIPAddress(); } /** @@ -279,7 +284,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements protected int getSocketTimeOutValue() { - IPreferenceStore store = SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore(); return store.getInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_TIMEOUT); } @@ -345,7 +350,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements protected void setPluginPathProperty() { - Bundle bundle = SystemPlugin.getDefault().getBundle(); + Bundle bundle = RSEUIPlugin.getDefault().getBundle(); URL pluginsURL = bundle.getEntry("/"); try @@ -468,20 +473,6 @@ public class DStoreConnectorService extends AbstractConnectorService implements clientConnection = new ClientConnection(getPrimarySubSystem().getHost().getAliasName()); - boolean useSSL = isUsingSSL(); - if (useSSL) - { - ISystemKeystoreProvider provider = SystemKeystoreProviderManager.getInstance().getDefaultProvider(); - if (provider != null) - { - String keyStore = provider.getKeyStorePath(); - String password = provider.getKeyStorePassword(); - - ISSLProperties properties = new ClientSSLProperties(true, keyStore, password); - clientConnection.setSSLProperties(properties); - } - } - clientConnection.setHost(getHostName()); clientConnection.setPort(Integer.toString(getPort())); @@ -504,13 +495,12 @@ public class DStoreConnectorService extends AbstractConnectorService implements // get Socket Timeout Value Preference int timeout = getSocketTimeOutValue(); - if (timeout <= 0) timeout = IUniversalDStoreConstants.DEFAULT_PREF_SOCKET_TIMEOUT; if (serverLauncherType == ServerLaunchType.REXEC_LITERAL) { if (monitor != null) { - SystemMessage cmsg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_STARTING_SERVER_VIA_REXEC); + SystemMessage cmsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_STARTING_SERVER_VIA_REXEC); monitor.subTask(cmsg.getLevelOneText()); } @@ -523,33 +513,33 @@ public class DStoreConnectorService extends AbstractConnectorService implements starter.setServerLauncherProperties(serverLauncher); - String serverPort = (String)starter.launch(monitor); - if (monitor.isCanceled()) - { - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_CANCELLED); - throw new SystemMessageException(msg); - } + int iServerPort = launchUsingRexec(monitor, info, serverLauncher); - if(!serverPort.equals("0")) - { - int iServerPort = 0; - if (serverPort != null) - { - iServerPort = Integer.parseInt(serverPort); - } - - clientConnection.setPort(serverPort); + if(iServerPort != 0) + { + clientConnection.setPort("" + iServerPort); if (monitor != null) { - SystemMessage cmsg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONNECTING_TO_SERVER); + SystemMessage cmsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECTING_TO_SERVER); cmsg.makeSubstitution(clientConnection.getPort()); monitor.subTask(cmsg.getLevelOneText()); } // connect to launched server connectStatus = clientConnection.connect(null, timeout); - + if (!connectStatus.isConnected() && connectStatus.getMessage().startsWith(ClientConnection.CANNOT_CONNECT)) + { + if (setSSLProperties(true)) + { + iServerPort = launchUsingRexec(monitor, info, serverLauncher); + if (iServerPort != 0) + { + clientConnection.setPort("" + iServerPort); + connectStatus = clientConnection.connect(null, timeout); + } + } + } } else { @@ -559,7 +549,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements String errorMsg = null; if (msg == null) { - errorMsg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CONNECT_FAILED).getLevelOneText(); + errorMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CONNECT_FAILED).getLevelOneText(); } else { @@ -573,7 +563,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements { if (monitor != null) { - SystemMessage cmsg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_STARTING_SERVER_VIA_DAEMON); + SystemMessage cmsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_STARTING_SERVER_VIA_DAEMON); monitor.subTask(cmsg.getLevelOneText()); } @@ -593,41 +583,80 @@ public class DStoreConnectorService extends AbstractConnectorService implements // DKM - changed to use protected member so that others can override //launchStatus = clientConnection.launchServer(info.getUserid(), info.getPassword(), daemonPort); + boolean usedSSL = false; launchStatus = launchServer(clientConnection, info, daemonPort, monitor); + if (!launchStatus.isConnected() && !clientConnection.isKnownStatus(launchStatus.getMessage())) + { + if (setSSLProperties(true)) + { + usedSSL = true; + launchStatus = launchServer(clientConnection, info, daemonPort, monitor); + } + } if (!launchStatus.isConnected()) { - launchFailed = true; - SystemBasePlugin.logError("Error launching server: " + launchStatus.getMessage(), null); + String launchMsg = launchStatus.getMessage(); + // If password has expired and must be changed + if (launchMsg != null && (isPasswordExpired(launchMsg) || isNewPasswordInvalid(launchMsg))) + { + NewPasswordInfo newPasswordInfo = null; + while (launchMsg != null && (isPasswordExpired(launchMsg) || isNewPasswordInvalid(launchMsg))) + { + newPasswordInfo = promptForNewPassword(isPasswordExpired(launchMsg) ? RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PASSWORD_EXPIRED) : RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PASSWORD_INVALID)); + launchStatus = changePassword(clientConnection, getPasswordInformation(), serverLauncher, monitor, newPasswordInfo.newPassword); + launchMsg = launchStatus.getMessage(); + } + if (newPasswordInfo != null) + { + setPassword(info.getUserid(), newPasswordInfo.newPassword, newPasswordInfo.savePassword); + info = getPasswordInformation(); + } + if (launchMsg != null && launchMsg.equals(IDataStoreConstants.ATTEMPT_RECONNECT)) + { + connect(monitor); + return; + } + } + else + { + launchFailed = true; + SystemBasePlugin.logError("Error launching server: " + launchStatus.getMessage(), null); + } } if (launchStatus.isConnected()) { if (monitor != null) { - SystemMessage cmsg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONNECTING_TO_SERVER); + SystemMessage cmsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECTING_TO_SERVER); cmsg.makeSubstitution(clientConnection.getPort()); monitor.subTask(cmsg.getLevelOneText()); } // connect to launched server + setSSLProperties(false); connectStatus = clientConnection.connect(launchStatus.getTicket(), timeout); - - if (!connectStatus.isConnected() && connectStatus.isSLLProblem()) + if (!connectStatus.isConnected() && connectStatus.getMessage().startsWith(ClientConnection.CANNOT_CONNECT)) { - - - List certs = connectStatus.getUntrustedCertificates(); - if (certs != null && certs.size() > 0) - { - ISystemKeystoreProvider provider = SystemKeystoreProviderManager.getInstance().getDefaultProvider(); - if (provider != null) + setSSLProperties(usedSSL); + launchStatus = launchServer(clientConnection, info, daemonPort, monitor); + if (!launchStatus.isConnected()) + { + launchFailed = true; + SystemBasePlugin.logError("Error launching server: " + launchStatus.getMessage(), null); + } + else + { + if (setSSLProperties(true)) { - if (provider.importCertificates(certs)) - { - connect(monitor); - } + connectStatus = clientConnection.connect(launchStatus.getTicket(), timeout); } } } + if (!connectStatus.isConnected() && connectStatus.isSLLProblem()) + { + importCertsAndReconnect(connectStatus, monitor); + return; + } /* if (connectStatus != null && connectStatus.getMessage().startsWith(ClientConnection.INCOMPATIBLE_UPDATE)) @@ -641,30 +670,71 @@ public class DStoreConnectorService extends AbstractConnectorService implements { connectStatus = new ConnectionStatus(false); connectStatus.setMessage( - SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CONNECT_FAILED).getLevelOneText()); + RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CONNECT_FAILED).getLevelOneText()); } } else if (serverLauncherType == ServerLaunchType.RUNNING_LITERAL) { if (monitor != null) { - SystemMessage cmsg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONNECTING_TO_SERVER); + SystemMessage cmsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECTING_TO_SERVER); cmsg.makeSubstitution(clientConnection.getPort()); monitor.subTask(cmsg.getLevelOneText()); } // connection directly - connectStatus = clientConnection.connect(null, timeout); + boolean useSSL = isUsingSSL(); + if (setSSLProperties(useSSL)) + connectStatus = clientConnection.connect(null, timeout); } // server launcher type is unknown else { SystemSignonInformation info = getPasswordInformation(); connectStatus = launchServer(clientConnection, info, serverLauncher, monitor); + if (!connectStatus.isConnected() && !clientConnection.isKnownStatus(connectStatus.getMessage())) + { + if (setSSLProperties(true)) + { + connectStatus = launchServer(clientConnection, info, serverLauncher, monitor); + if (!connectStatus.isConnected() && connectStatus.isSLLProblem()) + { + importCertsAndReconnect(connectStatus, monitor); + return; + } + } + } + } // if connected if (connectStatus != null && connectStatus.isConnected()) { + IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore(); + if (clientConnection.getDataStore().usingSSL() && store.getBoolean(ISystemPreferencesConstants.ALERT_SSL)) + { + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_USING_SSL); + msg.makeSubstitution(getHostName()); + DisplayHidableSystemMessageAction msgAction = new DisplayHidableSystemMessageAction(msg, store, ISystemPreferencesConstants.ALERT_SSL); + Display.getDefault().syncExec(msgAction); + if (msgAction.getReturnCode() != IDialogConstants.YES_ID) + { + disconnect(); + throw new InterruptedException(); + } + } + else if (!clientConnection.getDataStore().usingSSL() && store.getBoolean(ISystemPreferencesConstants.ALERT_NONSSL)) + { + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_NOT_USING_SSL); + msg.makeSubstitution(getHostName()); + DisplayHidableSystemMessageAction msgAction = new DisplayHidableSystemMessageAction(msg, store, ISystemPreferencesConstants.ALERT_NONSSL); + Display.getDefault().syncExec(msgAction); + if (msgAction.getReturnCode() != IDialogConstants.YES_ID) + { + disconnect(); + throw new InterruptedException(); + } + } + DataStore dataStore = clientConnection.getDataStore(); _connectionStatusListener = new ConnectionStatusListener(dataStore.getStatus(), this); @@ -707,12 +777,12 @@ public class DStoreConnectorService extends AbstractConnectorService implements if (message.startsWith(ClientConnection.CLIENT_OLDER)) { - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CLIENT_OLDER_WARNING); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CLIENT_OLDER_WARNING); msg.makeSubstitution(getHostName()); } else if (message.startsWith(ClientConnection.SERVER_OLDER)) { - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_SERVER_OLDER_WARNING); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_SERVER_OLDER_WARNING); msg.makeSubstitution(getHostName()); } ShowConnectMessage msgAction = new ShowConnectMessage(msg); @@ -726,7 +796,6 @@ public class DStoreConnectorService extends AbstractConnectorService implements if (serverVersion >= 8 || (serverVersion == 7 && getServerMinor() >= 1)) { // register the preference for remote class caching with the datastore - IPreferenceStore store = SystemPlugin.getDefault().getPreferenceStore(); store.setDefault(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES, IUniversalDStoreConstants.DEFAULT_PREF_CACHE_REMOTE_CLASSES); boolean cacheRemoteClasses = store.getBoolean(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES); @@ -741,7 +810,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements // Initialzie the miners if (monitor != null) { - SystemMessage imsg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_INITIALIZING_SERVER); + SystemMessage imsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_INITIALIZING_SERVER); monitor.subTask(imsg.getLevelOneText()); } DataElement initStatus = dataStore.initMiners(); @@ -771,7 +840,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements ISystemKeystoreProvider provider = SystemKeystoreProviderManager.getInstance().getDefaultProvider(); if (provider != null) { - if (provider.importCertificates(certs)) + if (provider.importCertificates(certs, getHostName())) { connect(monitor); return; @@ -781,7 +850,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements else { - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_SSL_EXCEPTION); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_SSL_EXCEPTION); msg.makeSubstitution(launchStatus.getMessage()); } } @@ -794,10 +863,10 @@ public class DStoreConnectorService extends AbstractConnectorService implements if (launchStatus.getException() != null) { Throwable exception = launchStatus.getException(); - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_DAEMON_FAILED_EXCEPTION); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_DAEMON_FAILED_EXCEPTION); msg.makeSubstitution(getHostName(), ""+serverLauncher.getDaemonPort(), exception); } - else if (launchMsg != null && launchMsg.indexOf("Authentification Failed") != -1) + else if (launchMsg != null && launchMsg.indexOf(IDataStoreConstants.AUTHENTICATION_FAILED) != -1) { if (launchFailed) { @@ -805,7 +874,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements } // Display error message - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_AUTH_FAILED); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_AUTH_FAILED); msg.makeSubstitution(getHostName()); DisplaySystemMessageAction msgAction = new DisplaySystemMessageAction(msg); Display.getDefault().syncExec(msgAction); @@ -841,9 +910,29 @@ public class DStoreConnectorService extends AbstractConnectorService implements // Since we got here we must be connected so skip error checking below return; } + // If password has expired and must be changed + else if (launchMsg != null && (isPasswordExpired(launchMsg) || isNewPasswordInvalid(launchMsg))) + { + NewPasswordInfo newPasswordInfo = null; + while (launchMsg != null && (isPasswordExpired(launchMsg) || isNewPasswordInvalid(launchMsg))) + { + newPasswordInfo = promptForNewPassword(isPasswordExpired(launchMsg) ? RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PASSWORD_EXPIRED) : RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PASSWORD_INVALID)); + launchStatus = changePassword(clientConnection, getPasswordInformation(), serverLauncher, monitor, newPasswordInfo.newPassword); + launchMsg = launchStatus.getMessage(); + } + if (newPasswordInfo != null) + { + setPassword(getPasswordInformation().getUserid(), newPasswordInfo.newPassword, newPasswordInfo.savePassword); + } + if (launchMsg != null && launchMsg.equals(IDataStoreConstants.ATTEMPT_RECONNECT)) + { + connect(monitor); + return; + } + } else if (launchMsg != null) { - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_DAEMON_FAILED); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_DAEMON_FAILED); msg.makeSubstitution(getHostName(), clientConnection.getPort(), launchMsg); } } @@ -853,12 +942,12 @@ public class DStoreConnectorService extends AbstractConnectorService implements { if (connectStatus.getMessage().startsWith(ClientConnection.INCOMPATIBLE_SERVER_UPDATE)) { - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INCOMPATIBLE_UPDATE); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INCOMPATIBLE_UPDATE); msg.makeSubstitution(getHostName()); } else if (connectStatus.getMessage().startsWith(ClientConnection.INCOMPATIBLE_PROTOCOL)) { - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INCOMPATIBLE_PROTOCOL); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INCOMPATIBLE_PROTOCOL); msg.makeSubstitution(getHostName()); } else @@ -866,7 +955,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements Throwable exception = connectStatus.getException(); if (exception != null) { - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED); msg.makeSubstitution(getHostName(), exception); } } @@ -876,7 +965,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements else if (connectStatus == null) { SystemBasePlugin.logError("Failed to connect to remote system", null); - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CONNECT_FAILED); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CONNECT_FAILED); msg.makeSubstitution(getHostName()); } @@ -884,7 +973,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements if (msg == null) { SystemBasePlugin.logError("Failed to connect to remote system" + connectStatus.getMessage(), null); - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CONNECT_FAILED); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CONNECT_FAILED); msg.makeSubstitution(getHostName()); } @@ -938,6 +1027,75 @@ public class DStoreConnectorService extends AbstractConnectorService implements } } + protected boolean isPasswordExpired(String message) + { + return message.indexOf(IDataStoreConstants.PASSWORD_EXPIRED) != -1; + } + + protected boolean isNewPasswordInvalid(String message) + { + return message.indexOf(IDataStoreConstants.NEW_PASSWORD_INVALID) != -1; + } + + protected void importCertsAndReconnect(ConnectionStatus connectStatus, IProgressMonitor monitor) throws Exception + { + List certs = connectStatus.getUntrustedCertificates(); + if (certs != null && certs.size() > 0) + { + ISystemKeystoreProvider provider = SystemKeystoreProviderManager.getInstance().getDefaultProvider(); + if (provider != null) + { + if (provider.importCertificates(certs, getHostName())) + { + connect(monitor); + return; + } + else + { + throw new InterruptedException(); + } + } + } + } + + protected int launchUsingRexec(IProgressMonitor monitor, SystemSignonInformation info, IServerLauncherProperties serverLauncherProperties) throws Exception + { + IServerLauncher starter = getRemoteServerLauncher(); + starter.setSignonInformation(info); + starter.setServerLauncherProperties(serverLauncherProperties); + + String serverPort = (String)starter.launch(monitor); + if (monitor.isCanceled()) + { + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_CANCELLED); + throw new SystemMessageException(msg); + } + + int iServerPort = 0; + if (serverPort != null) + { + iServerPort = Integer.parseInt(serverPort); + } + return iServerPort; + } + + protected boolean setSSLProperties(boolean enable) + { + ISystemKeystoreProvider provider = SystemKeystoreProviderManager.getInstance().getDefaultProvider(); + if (provider != null) + { + String keyStore = provider.getKeyStorePath(); + String password = provider.getKeyStorePassword(); + + ISSLProperties properties = new ClientSSLProperties(enable, keyStore, password); + clientConnection.setSSLProperties(properties); + return true; + } + else return false; + } + + + protected boolean promptForTrusting(Shell shell, X509Certificate cert) { return true; @@ -950,7 +1108,17 @@ public class DStoreConnectorService extends AbstractConnectorService implements */ protected ConnectionStatus launchServer(ClientConnection clientConnection, SystemSignonInformation info, int daemonPort, IProgressMonitor monitor) { - return clientConnection.launchServer(info.getUserid(), info.getPassword(), daemonPort); + return launchServer(clientConnection, info, daemonPort, monitor, 0); + } + + + /* + * Launch a DataStore server using a daemon. This method can be overridden if a custom implementation is required. + * The default implementation uses the daemon client that is built into ClientConnection. + */ + protected ConnectionStatus launchServer(ClientConnection clientConnection, SystemSignonInformation info, int daemonPort, IProgressMonitor monitor, int timeout) + { + return clientConnection.launchServer(info.getUserid(), info.getPassword(), daemonPort, timeout); } /* @@ -963,6 +1131,25 @@ public class DStoreConnectorService extends AbstractConnectorService implements return null; } + /** + * Change the password on a remote system and optionally remain connected to it. Subclasses must implement this + * method if they wish to + * @param clientConnection The connection on which the password must be changed + * @param info The old SystemSignonInformation, including the old password. + * @param serverLauncherProperties The properties of the server launcher used to connect to the server. Use this object to get the type of serverlauncher, if your implementation varies depending on the type. + * @param monitor a progress monitor + * @param newPassword the new password to which the old one will be changed. + * @return the status of the password change and optionally the connection. If the new password is rejected by the remote + * system, return new ConnectionStatus(false, IDataStoreConstants.NEW_PASSWORD_INVALID). + * If the system is now connected, and the server is ready to be connected, construct a new ConnectionStatus(true) and if using the RSE daemon, set the ticket on it + * to the ticket number of the server. If you wish to just have the UniversalSystem attempt a reconnect from the beginning after changing the password, + * return new ConnectionStatus(true, IDataStoreConstants.ATTEMPT_RECONNECT). + */ + protected ConnectionStatus changePassword(ClientConnection clientConnection, SystemSignonInformation info, IServerLauncherProperties serverLauncherProperties, IProgressMonitor monitor, String newPassword) + { + return new ConnectionStatus(false, IDataStoreConstants.AUTHENTICATION_FAILED); + } + /** * @see org.eclipse.rse.core.subsystems.IConnectorService#isConnected() */ @@ -998,7 +1185,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements { for (int idx = 0; idx < warnings.size(); idx++) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_W); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_W); msg.makeSubstitution((warnings.elementAt(idx)).toString()); SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg); msgDlg.open(); @@ -1029,7 +1216,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements // really authenticate with the remote system and this would be decieving // for the end user - if (getPrimarySubSystem().getHost().getSystemType().equals(ISystemTypes.SYSTEMTYPE_WINDOWS)) + if (getPrimarySubSystem().getHost().getSystemType().equals(IRSESystemType.SYSTEMTYPE_WINDOWS)) { String userid = getPrimarySubSystem().getUserId(); if (userid == null) @@ -1037,7 +1224,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements userid = "remoteuser"; } SystemSignonInformation info = new SystemSignonInformation(getPrimarySubSystem().getHost().getHostName(), - userid, "", ISystemTypes.SYSTEMTYPE_WINDOWS); + userid, "", IRSESystemType.SYSTEMTYPE_WINDOWS); return info; } else @@ -1053,7 +1240,7 @@ public class DStoreConnectorService extends AbstractConnectorService implements { // For Windows we never prompt for userid / password so we don't need // to clear the password cache - if (getPrimarySubSystem().getHost().getSystemType().equals(ISystemTypes.SYSTEMTYPE_WINDOWS)) + if (getPrimarySubSystem().getHost().getSystemType().equals(IRSESystemType.SYSTEMTYPE_WINDOWS)) { return false; } diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/RexecDstoreServer.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/RexecDstoreServer.java index 67c8660d077..57e5791ae2c 100644 --- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/RexecDstoreServer.java +++ b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/RexecDstoreServer.java @@ -25,13 +25,13 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.dstore.core.client.ClientConnection; import org.eclipse.dstore.core.client.ConnectionStatus; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.IIBMServerLauncher; import org.eclipse.rse.core.subsystems.IServerLauncher; import org.eclipse.rse.core.subsystems.IServerLauncherProperties; import org.eclipse.rse.model.SystemSignonInformation; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; /** * Launch Datastore server on selected host using the rexec @@ -452,7 +452,7 @@ public class RexecDstoreServer implements IServerLauncher // this should be stored in some resource bundle later //cmd = new String ("echo USSTEST;cd ~/dstore;start_anyport"); //cmd = new String("echo " + ASCII_TEST_STRING + ";cd ~/rseserver;start_anyport"); - cmd = new String("echo " + ASCII_TEST_STRING + ";cd " + this.cwd + ";" + this.invocation); + cmd = new String("echo " + ASCII_TEST_STRING + ";cd " + this.cwd + ";" + this.invocation + " " + System.getProperty("user.name")); logMessage("The command is " + cmd); SystemBasePlugin.logInfo("RexecDstoreServer :"); @@ -476,7 +476,7 @@ public class RexecDstoreServer implements IServerLauncher } if (timeout == 0) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INVALID_LOGIN); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INVALID_LOGIN); msg.makeSubstitution(signonInfo.getHostname(), ""); _errorMessage = msg; return port; @@ -557,11 +557,11 @@ public class RexecDstoreServer implements IServerLauncher if (index > -1) // remove the embedded ASCII_TEST_STRING hostMessage = hostMessage.substring(0,index) + hostMessage.substring(index+1+ASCII_TEST_STRING.length()); if (hostMessage.indexOf(EZYRD11E) >0 ){ - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INVALID_LOGIN); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INVALID_LOGIN); msg.makeSubstitution(signonInfo.getHostname(), hostMessage); _errorMessage = msg; } else { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_REXEC_NOTSTARTED); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_REXEC_NOTSTARTED); msg.makeSubstitution(""+rexecPort, signonInfo.getHostname(), hostMessage); _errorMessage = msg; @@ -654,7 +654,7 @@ public class RexecDstoreServer implements IServerLauncher cChar = (char) rxIn.readByte(); buf.append(cChar); } - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INVALID_LOGIN); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INVALID_LOGIN); msg.makeSubstitution(signonInfo.getHostname(), buf.toString()); _errorMessage = msg; } @@ -668,7 +668,7 @@ public class RexecDstoreServer implements IServerLauncher catch (Exception e) { System.out.println(e); - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_REXEC_NOTSTARTED); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_REXEC_NOTSTARTED); msg.makeSubstitution(""+rexecPort, signonInfo.getHostname(), e.getMessage()); _errorMessage = msg; } @@ -782,7 +782,7 @@ public class RexecDstoreServer implements IServerLauncher cChar = (char) rxIn.readByte(); buf.append(cChar); } - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INVALID_LOGIN); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INVALID_LOGIN); msg.makeSubstitution(signonInfo.getHostname(), buf.toString()); _errorMessage = msg; } @@ -797,7 +797,7 @@ public class RexecDstoreServer implements IServerLauncher catch (Exception e) { System.out.println(e); - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_REXEC_NOTSTARTED); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_REXEC_NOTSTARTED); msg.makeSubstitution(""+rexecPort, signonInfo.getHostname(), e.getMessage()); _errorMessage = msg; } @@ -831,7 +831,7 @@ public class RexecDstoreServer implements IServerLauncher if (monitor != null) { - SystemMessage cmsg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONNECTING_TO_SERVER); + SystemMessage cmsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECTING_TO_SERVER); cmsg.makeSubstitution(clientConnection.getPort()); monitor.subTask(cmsg.getLevelOneText()); } @@ -1033,7 +1033,7 @@ public class RexecDstoreServer implements IServerLauncher { } - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_SERVER_NOTSTARTED); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_SERVER_NOTSTARTED); diagnosticString.insert(0, "\n\n"); msg.makeSubstitution(signonInfo.getHostname(), diagnosticString.toString()); diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/ConnectionStatusListener.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/ConnectionStatusListener.java index f55df492669..9c55349c774 100644 --- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/ConnectionStatusListener.java +++ b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/ConnectionStatusListener.java @@ -26,12 +26,12 @@ import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.IConnectorService; import org.eclipse.rse.core.subsystems.SubSystemConfiguration; import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; @@ -112,7 +112,7 @@ public class ConnectionStatusListener implements IDomainListener, IRunnableWithP { Shell shell = getShell(); _connectionDown = true; - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_UNKNOWNHOST); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_UNKNOWNHOST); msg.makeSubstitution(_connection.getPrimarySubSystem().getHost().getAliasName()); SystemMessageDialog dialog = new SystemMessageDialog(internalGetShell(), msg); dialog.open(); @@ -121,7 +121,7 @@ public class ConnectionStatusListener implements IDomainListener, IRunnableWithP IRunnableContext runnableContext = getRunnableContext(getShell()); runnableContext.run(false,true,_listener); // inthread, cancellable, IRunnableWithProgress _connection.reset(); - ISystemRegistry sr = SystemPlugin.getDefault().getSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); sr.connectedStatusChange(_connection.getPrimarySubSystem(), false, true, true); } catch (InterruptedException exc) // user cancelled @@ -216,7 +216,7 @@ public class ConnectionStatusListener implements IDomainListener, IRunnableWithP IWorkbenchWindow win = SystemBasePlugin.getActiveWorkbenchWindow(); if (win != null) { - Shell winShell = SystemPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(); + Shell winShell = RSEUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(); if (winShell != null && !winShell.isDisposed() && winShell.isVisible()) { SystemBasePlugin.logInfo("Using active workbench window as runnable context"); @@ -247,12 +247,12 @@ public class ConnectionStatusListener implements IDomainListener, IRunnableWithP */ protected void showDisconnectErrorMessage(Shell shell, String hostName, int port, Exception exc) { - //SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR,shell,SystemPlugin.getResourceBundle(), + //SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR,shell,RSEUIPlugin.getResourceBundle(), // ISystemMessages.MSG_DISCONNECT_FAILED, // hostName, exc.getMessage()); - //SystemPlugin.logError("Disconnect failed",exc); // temporary + //RSEUIPlugin.logError("Disconnect failed",exc); // temporary SystemMessageDialog msgDlg = new SystemMessageDialog(shell, - SystemPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECT_FAILED).makeSubstitution(hostName,exc)); + RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECT_FAILED).makeSubstitution(hostName,exc)); msgDlg.setException(exc); msgDlg.open(); } @@ -263,10 +263,10 @@ public class ConnectionStatusListener implements IDomainListener, IRunnableWithP */ protected void showDisconnectCancelledMessage(Shell shell, String hostName, int port) { - //SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR, shell, SystemPlugin.getResourceBundle(), + //SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR, shell, RSEUIPlugin.getResourceBundle(), // ISystemMessages.MSG_DISCONNECT_CANCELLED, hostName); SystemMessageDialog msgDlg = new SystemMessageDialog(shell, - SystemPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECT_CANCELLED).makeSubstitution(hostName)); + RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECT_CANCELLED).makeSubstitution(hostName)); msgDlg.open(); } } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/StatusMonitor.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/StatusMonitor.java index c1f5a3ac65c..a342a42930a 100644 --- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/StatusMonitor.java +++ b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/StatusMonitor.java @@ -26,10 +26,10 @@ import org.eclipse.dstore.core.model.DataStore; import org.eclipse.dstore.extra.internal.extra.DomainEvent; import org.eclipse.dstore.extra.internal.extra.IDomainListener; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; 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.ui.RSEUIPlugin; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; diff --git a/rse/plugins/org.eclipse.rse.core/.classpath b/rse/plugins/org.eclipse.rse.core/.classpath index acad1c227c0..751c8f2e504 100644 --- a/rse/plugins/org.eclipse.rse.core/.classpath +++ b/rse/plugins/org.eclipse.rse.core/.classpath @@ -1,5 +1,6 @@ + diff --git a/rse/plugins/org.eclipse.rse.core/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.core/META-INF/MANIFEST.MF index f16e8e25366..ec7247c7eef 100644 --- a/rse/plugins/org.eclipse.rse.core/META-INF/MANIFEST.MF +++ b/rse/plugins/org.eclipse.rse.core/META-INF/MANIFEST.MF @@ -1,19 +1,10 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 -Bundle-Name: %plugin.name -Bundle-SymbolicName: org.eclipse.rse.core; singleton:=true +Bundle-Name: RSE Core +Bundle-SymbolicName: org.eclipse.rse.core;singleton:=true Bundle-Version: 1.0.0 +Bundle-Activator: org.eclipse.rse.core.RSECorePlugin Bundle-Localization: plugin -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.rse.services, - org.eclipse.rse.logging, - org.eclipse.core.resources, - org.eclipse.jface.text, - org.eclipse.ui.views, - org.eclipse.ui.forms, - org.eclipse.ui.ide, - org.eclipse.debug.ui, - org.eclipse.ui.workbench.texteditor -Eclipse-LazyStart: false -Bundle-Vendor: Eclipse.org +Require-Bundle: org.eclipse.core.runtime +Eclipse-LazyStart: true +Export-Package: org.eclipse.rse.core diff --git a/rse/plugins/org.eclipse.rse.core/build.properties b/rse/plugins/org.eclipse.rse.core/build.properties new file mode 100644 index 00000000000..e9863e281ea --- /dev/null +++ b/rse/plugins/org.eclipse.rse.core/build.properties @@ -0,0 +1,5 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml diff --git a/rse/plugins/org.eclipse.rse.core/plugin.xml b/rse/plugins/org.eclipse.rse.core/plugin.xml new file mode 100644 index 00000000000..239628c2c78 --- /dev/null +++ b/rse/plugins/org.eclipse.rse.core/plugin.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/rse/plugins/org.eclipse.rse.core/schema/systemTypes.exsd b/rse/plugins/org.eclipse.rse.core/schema/systemTypes.exsd new file mode 100644 index 00000000000..02b48d5f280 --- /dev/null +++ b/rse/plugins/org.eclipse.rse.core/schema/systemTypes.exsd @@ -0,0 +1,112 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + + + + + + + + + diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSECoreRegistry.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSECoreRegistry.java new file mode 100644 index 00000000000..ac35561ea40 --- /dev/null +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSECoreRegistry.java @@ -0,0 +1,46 @@ +/******************************************************************************** + * 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; + +/** + * Interface for RSE core registry. Clients should use this interface as the starting point for querying and + * manipulating model objects in the RSE framework. + * + * This interface is not intended to be implemented by clients. + */ +public interface IRSECoreRegistry { + + public static final String PI_RSE_CORE = "org.eclipse.rse.core"; + public static final String PI_SYSTEM_TYPES = "systemTypes"; + + /** + * Returns all defined system types. + * @return an array of all defined system types. + */ + public IRSESystemType[] getSystemTypes(); + + /** + * Returns the names of all defined system types. + */ + public String[] getSystemTypeNames(); + + /** + * Returns a system type object given the name. + * @param name the name of the system type + * @return the system type object with the given name, or null if none is found + */ + public IRSESystemType getSystemType(String name); +} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/ISystemTypes.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemType.java similarity index 58% rename from rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/ISystemTypes.java rename to rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemType.java index 6ba796721c8..cf76ad0afb6 100644 --- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/ISystemTypes.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemType.java @@ -15,12 +15,17 @@ ********************************************************************************/ package org.eclipse.rse.core; + +import org.eclipse.core.runtime.IAdaptable; +import org.osgi.framework.Bundle; + /** - * Constants for system types. - * These are kept in synch with the definitions from plugin.xml in org.eclipse.rse.core. + * Interface for a system type. Constants are defined for various system types. + * These constants are kept in sync with definitions in plugin.xml. + * + * This interface is not intended to be implemented by clients. */ -public interface ISystemTypes -{ +public interface IRSESystemType extends IAdaptable { /** * Linux system type, "Linux". @@ -71,4 +76,40 @@ public interface ISystemTypes * Windows system type, "Windows". */ public static final String SYSTEMTYPE_WINDOWS = "Windows"; + + /** + * Returns the id of the system type. + * @return the id of the system type + */ + public String getId(); + + /** + * Returns the name of the system type. + * @return the name of the system type + */ + public String getName(); + + /** + * Returns the description of the system type. + * @return the description of the system type + */ + public String getDescription(); + + /** + * Returns the property of this system type with the given key. + * null is returned if there is no such key/value pair. + * + * @param key the name of the property to return + * @return the value associated with the given key or null if none + */ + public String getProperty(String key); + + /** + * Returns the bundle which is responsible for the definition of this system type. + * Typically this is used as a base for searching for images and other files + * that are needed in presenting the system type. + * + * @return the bundle which defines this system type or null if none + */ + public Bundle getDefiningBundle(); } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java new file mode 100644 index 00000000000..c6691bd5ad8 --- /dev/null +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java @@ -0,0 +1,68 @@ +/******************************************************************************** + * 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; + +import org.eclipse.core.runtime.Plugin; +import org.eclipse.rse.core.internal.RSECoreRegistry; +import org.osgi.framework.BundleContext; + +/** + * The RSE core plugin class. Clients may extend this class. + */ +public class RSECorePlugin extends Plugin { + + // the shared instance + private static RSECorePlugin plugin; + + /** + * The constructor. + */ + public RSECorePlugin() { + plugin = this; + } + + /** + * Starts the bundle. + */ + public void start(BundleContext context) throws Exception { + super.start(context); + } + + /** + * This method is called when the plug-in is stopped. + */ + public void stop(BundleContext context) throws Exception { + super.stop(context); + plugin = null; + } + + /** + * Returns the shared instance. + * @return the shared instance. + */ + public static RSECorePlugin getDefault() { + return plugin; + } + + /** + * Returns the RSE core registry. Clients should use this method to get the registry which + * is the starting point for working with the RSE framework. + * @return the RSE core registry. + */ + public IRSECoreRegistry getRegistry() { + return RSECoreRegistry.getDefault(); + } +} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSECoreRegistry.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSECoreRegistry.java new file mode 100644 index 00000000000..5bbece6613b --- /dev/null +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSECoreRegistry.java @@ -0,0 +1,151 @@ +/******************************************************************************** + * 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.internal; + +import java.util.ArrayList; + +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IExtensionRegistry; +import org.eclipse.core.runtime.Platform; +import org.eclipse.rse.core.IRSECoreRegistry; +import org.eclipse.rse.core.IRSESystemType; + +/** + * Singleton class representing the RSE core registry. + */ +public class RSECoreRegistry implements IRSECoreRegistry { + + // the singleton instance + private static RSECoreRegistry instance; + + // extension registry + private IExtensionRegistry registry; + + // state variables + private boolean hasReadSystemTypes; + + // model objects + private IRSESystemType[] systemTypes; + + // constants + private static final String ELEMENT_SYTEM_TYPE = "systemType"; + + /** + * Constructor. + */ + private RSECoreRegistry() { + super(); + init(); + } + + /** + * Initializes the registry. This should only be called from the constructor. + */ + private void init() { + registry = Platform.getExtensionRegistry(); + } + + /** + * Returns the singleton instance of the registry. + * @return the singleton instance + */ + public static final RSECoreRegistry getDefault() { + + if (instance == null) { + instance = new RSECoreRegistry(); + } + + return instance; + } + + /** + * Returns all system types that have been defined. + * @see org.eclipse.rse.core.IRSECoreRegistry#getSystemTypes() + */ + public IRSESystemType[] getSystemTypes() { + + if (!hasReadSystemTypes) { + systemTypes = readSystemTypes(); + hasReadSystemTypes = true; + } + + return systemTypes; + } + + /** + * Returns the system type with the given name. + * @see org.eclipse.rse.core.IRSECoreRegistry#getSystemType(java.lang.String) + */ + public IRSESystemType getSystemType(String name) { + + IRSESystemType[] types = getSystemTypes(); + + for (int i = 0; i < types.length; i++) { + IRSESystemType type = types[i]; + + if (type.getName().equals(name)) { + return type; + } + } + + return null; + } + + /** + * @see org.eclipse.rse.core.IRSECoreRegistry#getSystemTypeNames() + */ + public String[] getSystemTypeNames() { + IRSESystemType[] types = getSystemTypes(); + String[] names = new String[types.length]; + + for (int i = 0; i < types.length; i++) { + IRSESystemType type = types[i]; + names[i] = type.getName(); + } + + return names; + } + + /** + * Reads system types from the extension point registry and returns the defined system types. + * @return an array of system types that have been defined + */ + private IRSESystemType[] readSystemTypes() { + + IExtensionRegistry registry = getExtensionRegistry(); + IConfigurationElement[] elements = registry.getConfigurationElementsFor(PI_RSE_CORE, PI_SYSTEM_TYPES); + IRSESystemType[] types = new IRSESystemType[elements.length]; + + for (int i = 0; i < elements.length; i++) { + IConfigurationElement element = elements[i]; + + if (element.getName().equals(ELEMENT_SYTEM_TYPE)) { + RSESystemType type = new RSESystemType(element); + types[i] = type; + } + } + + return types; + } + + /** + * Returns the platform extension registry. + * @return the platform extension registry + */ + private IExtensionRegistry getExtensionRegistry() { + return registry; + } +} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSESystemType.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSESystemType.java new file mode 100644 index 00000000000..f75cc660f32 --- /dev/null +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSESystemType.java @@ -0,0 +1,120 @@ +/******************************************************************************** + * 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.internal; + +import java.util.HashMap; + +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.Platform; +import org.eclipse.rse.core.IRSESystemType; +import org.osgi.framework.Bundle; + +/** + * Class representing a system type. + */ +public class RSESystemType implements IRSESystemType { + + private static final String ATTR_ID = "id"; + private static final String ATTR_NAME = "name"; + private static final String ATTR_DESCRIPTION = "description"; + private static final String ATTR_VALUE = "value"; + + String id = null; + String name = null; + String description = null; + HashMap properties; + Bundle definingBundle = null; + + /** + * Constructor for an object representing a system type. + * @param element the configuration element describing the system type + */ + public RSESystemType(IConfigurationElement element) { + + id = element.getAttribute(ATTR_ID); + name = element.getAttribute(ATTR_NAME); + description = element.getAttribute(ATTR_DESCRIPTION); + + loadProperties(element); + + definingBundle = Platform.getBundle(element.getContributor().getName()); + } + + /** + * Loads properties defined for the system type. + * @param element the configuration element + */ + private void loadProperties(IConfigurationElement element) { + IConfigurationElement[] children = element.getChildren(); + properties = new HashMap(children.length); + + for (int i = 0; i < children.length; i++) { + IConfigurationElement child = children[i]; + String key = child.getAttribute(ATTR_NAME); + String value = child.getAttribute(ATTR_VALUE); + + if (key != null && value != null) + properties.put(key, value); + } + } + + /** + * Returns the id of the system type. + * @see org.eclipse.rse.core.IRSESystemType#getId() + */ + public String getId() { + return id; + } + + /** + * Returns the name of the system type. + * @see org.eclipse.rse.core.IRSESystemType#getName() + */ + public String getName() { + return name; + } + + /** + * Returns the description of the system type. + * @see org.eclipse.rse.core.IRSESystemType#getDescription() + */ + public String getDescription() { + return description; + } + + /** + * Returns a property of the system type given a key. + * @see org.eclipse.rse.core.IRSESystemType#getProperty(java.lang.String) + */ + public String getProperty(String key) { + return (String)(properties.get(key)); + } + + /** + * Returns the bundle which is responsible for the definition of this system type. + * @see org.eclipse.rse.core.IRSESystemType#getDefiningBundle() + */ + public Bundle getDefiningBundle() { + return definingBundle; + } + + /** + * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class) + */ + public Object getAdapter(Class adapter) { + return Platform.getAdapterManager().getAdapter(this, adapter); + } +} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/UniversalKeystoreProvider.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/UniversalKeystoreProvider.java index 8df369f3889..4a671a68c1d 100644 --- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/UniversalKeystoreProvider.java +++ b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/UniversalKeystoreProvider.java @@ -32,11 +32,13 @@ public class UniversalKeystoreProvider implements ISystemKeystoreProvider private List _certificates; private ISystemKeystoreProvider _provider; private boolean _wasCancelled = false; + private String _systemName; - public ImportCertificateRunnable(ISystemKeystoreProvider provider, List certs) + public ImportCertificateRunnable(ISystemKeystoreProvider provider, List certs, String systemName) { _certificates = certs; _provider = provider; + _systemName = systemName; } public boolean wasCancelled() @@ -47,7 +49,7 @@ public class UniversalKeystoreProvider implements ISystemKeystoreProvider public void run() { Shell shell = Display.getDefault().getActiveShell(); - SystemImportCertAction importAction = new SystemImportCertAction(_provider, _certificates); + SystemImportCertAction importAction = new SystemImportCertAction(_provider, _certificates, _systemName); importAction.run(); _wasCancelled = importAction.wasCancelled(); } @@ -63,10 +65,10 @@ public class UniversalKeystoreProvider implements ISystemKeystoreProvider return UniversalSecurityPlugin.getKeyStoreLocation(); } - public boolean importCertificates(List certs) + public boolean importCertificates(List certs, String systemName) { Display display = Display.getDefault(); - ImportCertificateRunnable impRun = new ImportCertificateRunnable(this, certs); + ImportCertificateRunnable impRun = new ImportCertificateRunnable(this, certs, systemName); display.syncExec(impRun); return !impRun.wasCancelled(); diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/UniversalSecurityPreferencePage.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/UniversalSecurityPreferencePage.java index d09a50ef349..ad1b33970b6 100644 --- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/UniversalSecurityPreferencePage.java +++ b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/UniversalSecurityPreferencePage.java @@ -43,11 +43,11 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.TableLayout; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.window.Window; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.dstore.security.UniversalSecurityPlugin; import org.eclipse.rse.dstore.security.UniversalSecurityProperties; import org.eclipse.rse.dstore.security.util.GridUtil; import org.eclipse.rse.dstore.security.util.StringModifier; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; @@ -119,7 +119,7 @@ public class UniversalSecurityPreferencePage extends PreferencePage implements createButtons(buttons); initializeValues(); - SystemWidgetHelpers.setCompositeHelp(parent, SystemPlugin.HELPPREFIX + "ssls0000"); + SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "ssls0000"); return composite; } diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertAction.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertAction.java index b7c14fb4b76..a9a54377238 100644 --- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertAction.java +++ b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertAction.java @@ -30,7 +30,9 @@ public class SystemImportCertAction extends SystemBaseWizardAction { private List _certificates; private ISystemKeystoreProvider _provider; - public SystemImportCertAction(ISystemKeystoreProvider provider, List certs) + private String _systemName; + + public SystemImportCertAction(ISystemKeystoreProvider provider, List certs, String systemName) { super(UniversalSecurityProperties.RESID_SECURITY_TRUST_IMPORT_CERTIFICATE_WIZARD, ImageRegistry.getImageDescriptor(ImageRegistry.IMG_CERTIF_FILE), @@ -38,12 +40,13 @@ public class SystemImportCertAction extends SystemBaseWizardAction ); _certificates = certs; _provider = provider; + _systemName = systemName; } public IWizard createWizard() { Shell shell = Display.getDefault().getActiveShell(); - SystemImportCertWizard importWiz = new SystemImportCertWizard(_provider); + SystemImportCertWizard importWiz = new SystemImportCertWizard(_provider, _systemName); importWiz.setInputObject(_certificates); return importWiz; } diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertWizard.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertWizard.java index 8e69f15151c..8767e35629e 100644 --- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertWizard.java +++ b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertWizard.java @@ -23,12 +23,12 @@ import java.util.List; import org.eclipse.dstore.core.util.ssl.DStoreKeyStore; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.comm.ISystemKeystoreProvider; import org.eclipse.rse.dstore.security.ImageRegistry; import org.eclipse.rse.dstore.security.UniversalSecurityProperties; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.wizards.AbstractSystemWizard; public class SystemImportCertWizard @@ -39,16 +39,18 @@ public class SystemImportCertWizard private SystemImportCertWizardMainPage _mainPage; private SystemImportCertWizardAliasPage _aliasPage; private ISystemKeystoreProvider _provider; + private String _systemName; /** * Constructor */ - public SystemImportCertWizard(ISystemKeystoreProvider provider) + public SystemImportCertWizard(ISystemKeystoreProvider provider, String systemName) { super(UniversalSecurityProperties.RESID_SECURITY_TRUST_IMPORT_CERTIFICATE_WIZARD, ImageRegistry.getImageDescriptor(ImageRegistry.IMG_WZ_IMPORT_CERTIF)); _provider = provider; + _systemName = systemName; } /** @@ -92,7 +94,7 @@ public class SystemImportCertWizard { SystemMessage errMsg = null; - _aliasPage = new SystemImportCertWizardAliasPage(this, getCertificates()); + _aliasPage = new SystemImportCertWizardAliasPage(this, getCertificates(), _systemName); if (errMsg != null) _aliasPage.setErrorMessage(errMsg); return _aliasPage; diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertWizardAliasPage.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertWizardAliasPage.java index 034368d4c10..783d246fb9d 100644 --- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertWizardAliasPage.java +++ b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/wizards/SystemImportCertWizardAliasPage.java @@ -16,10 +16,14 @@ package org.eclipse.rse.dstore.security.wizards; +import java.security.KeyStore; import java.security.cert.X509Certificate; +import java.util.Enumeration; import java.util.List; +import org.eclipse.dstore.core.util.ssl.DStoreKeyStore; import org.eclipse.jface.wizard.Wizard; +import org.eclipse.rse.dstore.security.UniversalSecurityPlugin; import org.eclipse.rse.dstore.security.UniversalSecurityProperties; import org.eclipse.rse.dstore.security.preference.X509CertificateElement; import org.eclipse.rse.services.clientserver.messages.SystemMessage; @@ -48,16 +52,18 @@ public class SystemImportCertWizardAliasPage protected SystemMessage errorMessage; protected ISystemValidator nameValidator; protected ISystemMessageLine msgLine; + private String _systemName; private Text _alias; /** * Constructor. */ - public SystemImportCertWizardAliasPage(Wizard wizard, List certs) + public SystemImportCertWizardAliasPage(Wizard wizard, List certs, String systemName) { super(wizard, "SpecifyAlias", UniversalSecurityProperties.RESID_SECURITY_TRUST_WIZ_ALIAS_TITLE, UniversalSecurityProperties.RESID_SECURITY_TRUST_WIZ_ALIAS_DESC); + _systemName = systemName; } /** @@ -85,6 +91,7 @@ public class SystemImportCertWizardAliasPage } } ); + initializeInput(); return _alias; } @@ -116,6 +123,7 @@ public class SystemImportCertWizardAliasPage */ protected void initializeInput() { + _alias.setText(getAlias()); } /** @@ -159,7 +167,30 @@ public class SystemImportCertWizardAliasPage */ public String getAlias() { - return _alias.getText(); + String alias = _alias.getText().trim(); + if (alias.equals("")) + { + try + { + int count = 0; + String storePath = UniversalSecurityPlugin.getKeyStoreLocation(); + String passw = UniversalSecurityPlugin.getKeyStorePassword(); + KeyStore keyStore = DStoreKeyStore.getKeyStore(storePath, passw); + Enumeration aliases = keyStore.aliases(); + while (aliases.hasMoreElements()) + { + String existingalias = (String) (aliases.nextElement()); + if (existingalias.toLowerCase().startsWith(_systemName.toLowerCase())) count++; + } + count++; + alias = _systemName + count; + } + catch (Exception e) + { + alias = _systemName; + } + } + return alias; } /** @@ -168,7 +199,7 @@ public class SystemImportCertWizardAliasPage */ public boolean isPageComplete() { - return (errorMessage==null) && (_alias.getText().trim().length()>0); + return (errorMessage==null); } 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 11cfca09676..3de50cd4307 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 @@ -20,11 +20,11 @@ import java.net.URI; import org.eclipse.core.filesystem.IFileStore; import org.eclipse.core.filesystem.provider.FileSystem; -import org.eclipse.rse.core.SystemPlugin; 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.IRemoteFileSubSystem; +import org.eclipse.rse.ui.RSEUIPlugin; public class RSEFileSystem extends FileSystem { @@ -41,7 +41,7 @@ public class RSEFileSystem extends FileSystem private IHost getConnectionFor(String hostName) { - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); IHost[] connections = sr.getHosts(); for (int i = 0; i < connections.length; i++) { diff --git a/rse/plugins/org.eclipse.rse.files.ui/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.files.ui/META-INF/MANIFEST.MF index f7abcb33f40..5b4fb610e0a 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/META-INF/MANIFEST.MF +++ b/rse/plugins/org.eclipse.rse.files.ui/META-INF/MANIFEST.MF @@ -18,7 +18,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.compare, org.eclipse.rse.subsystems.shells.core, org.eclipse.rse.subsystems.files.core, - org.eclipse.rse.ui + org.eclipse.rse.ui, + org.eclipse.rse.core Eclipse-LazyStart: true Export-Package: org.eclipse.rse.files.ui, org.eclipse.rse.files.ui.actions, 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 ebaa67f3d8a..ad82e168d2a 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,7 +19,6 @@ package org.eclipse.rse.files.ui; import java.util.Vector; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.files.ui.actions.SystemSelectFileTypesAction; @@ -36,6 +35,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConf import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystemConfiguration; import org.eclipse.rse.subsystems.files.core.util.ValidatorFileFilterString; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.actions.SystemTestFilterStringAction; import org.eclipse.rse.ui.filters.SystemFilterStringEditPane; @@ -183,7 +183,7 @@ public class SystemFileFilterStringEditPane boolean readonly = false; folderCombo = SystemFileWidgetHelpers.createFolderCombo(composite_prompts, null, gridColumns, historyKey, readonly); folderCombo.setShowNewConnectionPrompt(false); - SystemWidgetHelpers.setHelp(folderCombo, SystemPlugin.HELPPREFIX+"ffsd0001"); + SystemWidgetHelpers.setHelp(folderCombo, RSEUIPlugin.HELPPREFIX+"ffsd0001"); SystemWidgetHelpers.createLabel(composite_prompts," ",gridColumns); // FILLER // parent folder prompt @@ -191,8 +191,8 @@ public class SystemFileFilterStringEditPane // "Subset by file name filter" radiobutton subsetByFileNameRadioButton = SystemWidgetHelpers.createRadioButton(composite_prompts, null, SystemFileResources.RESID_FILEFILTERSTRING_BYFILENAME_LABEL, SystemFileResources.RESID_FILEFILTERSTRING_BYFILENAME_TOOLTIP); - //SystemWidgetHelpers.setHelp(subsetByFileNameRadioButton, SystemPlugin.HELPPREFIX+"ffsd0002", SystemPlugin.HELPPREFIX+"ffsd0003"); - SystemWidgetHelpers.setHelp(subsetByFileNameRadioButton, SystemPlugin.HELPPREFIX+"ffsd0002"); + //SystemWidgetHelpers.setHelp(subsetByFileNameRadioButton, RSEUIPlugin.HELPPREFIX+"ffsd0002", RSEUIPlugin.HELPPREFIX+"ffsd0003"); + SystemWidgetHelpers.setHelp(subsetByFileNameRadioButton, RSEUIPlugin.HELPPREFIX+"ffsd0002"); updateGridData(subsetByFileNameRadioButton, gridColumns); // File name prompt @@ -203,22 +203,22 @@ public class SystemFileFilterStringEditPane labelFile.setToolTipText(SystemFileResources.RESID_FILEFILTERSTRING_FILE_TOOLTIP); textFile = SystemWidgetHelpers.createTextField(composite_prompts, null); textFile.setToolTipText(SystemFileResources.RESID_FILEFILTERSTRING_FILE_TOOLTIP); - //SystemWidgetHelpers.setHelp(textFile, SystemPlugin.HELPPREFIX+"ffsd0003",SystemPlugin.HELPPREFIX+"ffsd0002"); - SystemWidgetHelpers.setHelp(textFile, SystemPlugin.HELPPREFIX+"ffsd0003"); + //SystemWidgetHelpers.setHelp(textFile, RSEUIPlugin.HELPPREFIX+"ffsd0003",RSEUIPlugin.HELPPREFIX+"ffsd0002"); + SystemWidgetHelpers.setHelp(textFile, RSEUIPlugin.HELPPREFIX+"ffsd0003"); updateGridData(textFile, gridColumns-1); textFile.setText("*"); // "Subset by file types filter" radiobutton subsetByFileTypesRadioButton = SystemWidgetHelpers.createRadioButton(composite_prompts, null, SystemFileResources.RESID_FILEFILTERSTRING_BYFILETYPES_LABEL, SystemFileResources.RESID_FILEFILTERSTRING_BYFILETYPES_TOOLTIP); - //SystemWidgetHelpers.setHelp(subsetByFileTypesRadioButton, SystemPlugin.HELPPREFIX+"ffsd0004", SystemPlugin.HELPPREFIX+"ffsd0005"); - SystemWidgetHelpers.setHelp(subsetByFileTypesRadioButton, SystemPlugin.HELPPREFIX+"ffsd0004"); + //SystemWidgetHelpers.setHelp(subsetByFileTypesRadioButton, RSEUIPlugin.HELPPREFIX+"ffsd0004", RSEUIPlugin.HELPPREFIX+"ffsd0005"); + SystemWidgetHelpers.setHelp(subsetByFileTypesRadioButton, RSEUIPlugin.HELPPREFIX+"ffsd0004"); updateGridData(subsetByFileTypesRadioButton, gridColumns); // File types prompt Composite typesGroup = SystemWidgetHelpers.createComposite(composite_prompts, 3); - //SystemWidgetHelpers.setHelp(typesGroup, SystemPlugin.HELPPREFIX+"ffsd0005",SystemPlugin.HELPPREFIX+"ffsd0004"); - SystemWidgetHelpers.setHelp(typesGroup, SystemPlugin.HELPPREFIX+"ffsd0005"); + //SystemWidgetHelpers.setHelp(typesGroup, RSEUIPlugin.HELPPREFIX+"ffsd0005",RSEUIPlugin.HELPPREFIX+"ffsd0004"); + SystemWidgetHelpers.setHelp(typesGroup, RSEUIPlugin.HELPPREFIX+"ffsd0005"); GridLayout layout = (GridLayout)typesGroup.getLayout(); layout.marginWidth = 0; layout.marginHeight = 0; @@ -251,7 +251,7 @@ public class SystemFileFilterStringEditPane SystemWidgetHelpers.createLabel(composite_prompts," ",gridColumns); // FILLER filesOnlyCheckBox = SystemWidgetHelpers.createCheckBox(composite_prompts, gridColumns, null, SystemFileResources.RESID_FILEFILTERSTRING_INCFILESONLY_LABEL, SystemFileResources.RESID_FILEFILTERSTRING_INCFILESONLY_TOOLTIP); - SystemWidgetHelpers.setHelp(filesOnlyCheckBox, SystemPlugin.HELPPREFIX+"ffsd0006"); + SystemWidgetHelpers.setHelp(filesOnlyCheckBox, RSEUIPlugin.HELPPREFIX+"ffsd0006"); // Test button /* @@ -260,7 +260,7 @@ public class SystemFileFilterStringEditPane SystemWidgetHelpers.createLabel(composite_prompts," ",gridColumns); // FILLER SystemWidgetHelpers.createLabel(composite_prompts," ",gridColumns); // FILLER createTestButton(composite_prompts, RESID_FILEFILTERSTRING_TEST_ROOT); - SystemWidgetHelpers.setHelp(testButton, SystemPlugin.HELPPREFIX+"ffsd0007"); + SystemWidgetHelpers.setHelp(testButton, RSEUIPlugin.HELPPREFIX+"ffsd0007"); updateGridData(testButton, gridColumns); } */ @@ -331,7 +331,7 @@ public class SystemFileFilterStringEditPane if (folderCombo == null) return; //if (refProvider == null) - //SystemPlugin.logError("Programming Error: input subsystem is not set for SystemFileFilterStringEditPane",null); + //RSEUIPlugin.logError("Programming Error: input subsystem is not set for SystemFileFilterStringEditPane",null); if (inputFilterString != null) { @@ -482,7 +482,7 @@ public class SystemFileFilterStringEditPane { if (textTypes.getText().trim().length() == 0) { - errorMessage = SystemPlugin.getPluginMessage(FILEMSG_ERROR_NOFILETYPES); + errorMessage = RSEUIPlugin.getPluginMessage(FILEMSG_ERROR_NOFILETYPES); } } controlInError = textFile; @@ -495,7 +495,7 @@ public class SystemFileFilterStringEditPane notUnique = true; if (notUnique) { - errorMessage = SystemPlugin.getPluginMessage(FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE).makeSubstitution(currFilterString); + errorMessage = RSEUIPlugin.getPluginMessage(FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE).makeSubstitution(currFilterString); } controlInError = textFile; } @@ -611,7 +611,7 @@ public class SystemFileFilterStringEditPane } // no path validator, so just use default path empty message else { - errorMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PATH_EMPTY); + errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PATH_EMPTY); } } // KM: defect 53210 @@ -627,7 +627,7 @@ public class SystemFileFilterStringEditPane } // no path validator, so just use default path empty message else { - errorMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PATH_EMPTY); + errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PATH_EMPTY); } } } 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 ba7a0310714..792a1718b5d 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,7 +27,6 @@ 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.SystemPlugin; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.resources.AddToArchiveDialog; import org.eclipse.rse.model.IHost; @@ -42,6 +41,7 @@ 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.IVirtualRemoteFile; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.rse.ui.view.ISystemDragDropAdapter; @@ -67,7 +67,7 @@ public class SystemAddToArchiveAction extends SystemBaseAction _selected = new ArrayList(); _parent = parent; allowOnMultipleSelection(true); - setHelp(SystemPlugin.HELPPREFIX + "actn0122"); + setHelp(RSEUIPlugin.HELPPREFIX + "actn0122"); } public SystemAddToArchiveAction(Shell parent, String label, String tooltip) @@ -76,7 +76,7 @@ public class SystemAddToArchiveAction extends SystemBaseAction _selected = new ArrayList(); _parent = parent; allowOnMultipleSelection(true); - setHelp(SystemPlugin.HELPPREFIX + "actn0122"); + setHelp(RSEUIPlugin.HELPPREFIX + "actn0122"); } public void run() @@ -135,7 +135,7 @@ public class SystemAddToArchiveAction extends SystemBaseAction if (ArchiveHandlerManager.isVirtual(destinationArchive.getAbsolutePath())) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_ADDTO_VIRTUAL_DEST); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ADDTO_VIRTUAL_DEST); SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg); dlg.open(); continue; @@ -143,7 +143,7 @@ public class SystemAddToArchiveAction extends SystemBaseAction if (destinationInSource(destinationArchive)) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_DEST_NOT_IN_SOURCE); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DEST_NOT_IN_SOURCE); SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg); dlg.open(); continue; @@ -164,7 +164,7 @@ public class SystemAddToArchiveAction extends SystemBaseAction IRemoteFile selection = (IRemoteFile) _selected.get(i); addToArchive(selection, destinationArchive, saveFullPathInfo, relativeTo); } - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry 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; @@ -320,7 +320,7 @@ public class SystemAddToArchiveAction extends SystemBaseAction protected IRunnableContext getRunnableContext(Shell shell) { - IRunnableContext irc = SystemPlugin.getTheSystemRegistry().getRunnableContext(); + IRunnableContext irc = RSEUIPlugin.getTheSystemRegistry().getRunnableContext(); if (irc != null) { return irc; 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 00d61787dc0..670114aea86 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 @@ -16,7 +16,6 @@ package org.eclipse.rse.files.ui.actions; import org.eclipse.jface.operation.IRunnableContext; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.resources.CombineDialog; import org.eclipse.rse.model.ISystemRegistry; @@ -30,6 +29,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.swt.widgets.Shell; @@ -45,8 +45,8 @@ public class SystemCombineAction extends SystemExtractToAction { public SystemCombineAction(Shell parent) { super(parent, FileResources.ACTION_COMBINE_LABEL, FileResources.ACTION_COMBINE_TOOLTIP); - setHelp(SystemPlugin.HELPPREFIX + "actn0120"); - setImageDescriptor(SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_COMBINE_ID)); + setHelp(RSEUIPlugin.HELPPREFIX + "actn0120"); + setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_COMBINE_ID)); } @@ -95,7 +95,7 @@ public class SystemCombineAction extends SystemExtractToAction { if (ArchiveHandlerManager.isVirtual(destination.getAbsolutePath())) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMBINETO_VIRTUAL_DEST); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMBINETO_VIRTUAL_DEST); SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg); dlg.open(); continue; @@ -103,7 +103,7 @@ public class SystemCombineAction extends SystemExtractToAction { if (destinationInSource(destination)) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_DEST_NOT_IN_SOURCE); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DEST_NOT_IN_SOURCE); SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg); dlg.open(); continue; @@ -162,7 +162,7 @@ public class SystemCombineAction extends SystemExtractToAction { { } } - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry 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 aab9317462d..8d269bee2a2 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 @@ -16,7 +16,6 @@ package org.eclipse.rse.files.ui.actions; import org.eclipse.jface.operation.IRunnableContext; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.resources.CombineDialog; import org.eclipse.rse.model.ISystemRegistry; @@ -30,6 +29,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.swt.widgets.Shell; @@ -46,8 +46,8 @@ public class SystemConvertAction extends SystemExtractToAction { public SystemConvertAction(Shell parent) { super(parent, FileResources.ACTION_CONVERT_LABEL, FileResources.ACTION_CONVERT_TOOLTIP); - setHelp(SystemPlugin.HELPPREFIX + "actn0121"); - setImageDescriptor(SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CONVERT_ID)); + setHelp(RSEUIPlugin.HELPPREFIX + "actn0121"); + setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CONVERT_ID)); } @@ -70,7 +70,7 @@ public class SystemConvertAction extends SystemExtractToAction { dialog.setPreSelection(selection); dialog.setBlockOnOpen(true); - dialog.setHelp(SystemPlugin.HELPPREFIX + "cnvd0000"); + dialog.setHelp(RSEUIPlugin.HELPPREFIX + "cnvd0000"); dialog.setShowLocationPrompt(true); dialog.setLocationPrompt(FileResources.RESID_CONVERT_LOCATION); dialog.setNameAndTypePrompt(FileResources.RESID_CONVERT_NAMEANDTYPE); @@ -100,7 +100,7 @@ public class SystemConvertAction extends SystemExtractToAction { if (ArchiveHandlerManager.isVirtual(destination.getAbsolutePath())) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONVERTTO_VIRTUAL_DEST); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONVERTTO_VIRTUAL_DEST); SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg); dlg.open(); i--; @@ -108,7 +108,7 @@ public class SystemConvertAction extends SystemExtractToAction { } if (!destination.canWrite()) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_DEST_TARGET_READONLY); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DEST_TARGET_READONLY); SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg); dlg.open(); i--; @@ -116,7 +116,7 @@ public class SystemConvertAction extends SystemExtractToAction { } if (selection.isAncestorOf(destination)) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_DEST_NOT_IN_SOURCE); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DEST_NOT_IN_SOURCE); SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg); dlg.open(); i--; @@ -127,7 +127,7 @@ public class SystemConvertAction extends SystemExtractToAction { { if (destination.exists()) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_UPLOAD_FILE_EXISTS); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UPLOAD_FILE_EXISTS); msg.makeSubstitution(destination.getName()); SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg); boolean ok = dlg.openQuestionNoException(); @@ -171,7 +171,7 @@ public class SystemConvertAction extends SystemExtractToAction { catch (java.lang.InterruptedException e) { } - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry 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 0baaec720d5..b4abd5c0f57 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,7 +24,6 @@ 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.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.files.ui.dialogs.SystemSelectRemoteFileOrFolderDialog; import org.eclipse.rse.files.ui.resources.SystemRemoteEditManager; @@ -36,6 +35,7 @@ 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.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; @@ -74,8 +74,8 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction SystemCopyRemoteFileAction(Shell shell, int mode) { super(shell, mode); - setHelp(SystemPlugin.HELPPREFIX+"actn0110"); - setDialogHelp(SystemPlugin.HELPPREFIX+"dcrf0000"); + setHelp(RSEUIPlugin.HELPPREFIX+"actn0110"); + setDialogHelp(RSEUIPlugin.HELPPREFIX+"dcrf0000"); } /** @@ -138,9 +138,9 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction targetFileOrFolder = ss.getRemoteFileObject(targetFolder, oldName); - //SystemPlugin.logInfo("CHECKING FOR COLLISION ON '"+srcFileOrFolder.getAbsolutePath() + "' IN '" +targetFolder.getAbsolutePath()+"'"); - //SystemPlugin.logInfo("...TARGET FILE: '"+tgtFileOrFolder.getAbsolutePath()+"'"); - //SystemPlugin.logInfo("...target.exists()? "+tgtFileOrFolder.exists()); + //RSEUIPlugin.logInfo("CHECKING FOR COLLISION ON '"+srcFileOrFolder.getAbsolutePath() + "' IN '" +targetFolder.getAbsolutePath()+"'"); + //RSEUIPlugin.logInfo("...TARGET FILE: '"+tgtFileOrFolder.getAbsolutePath()+"'"); + //RSEUIPlugin.logInfo("...target.exists()? "+tgtFileOrFolder.exists()); if (targetFileOrFolder.exists()) { //monitor.setVisible(false); wish we could! @@ -189,7 +189,7 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction ok = ss.copy(srcFileOrFolder, targetFolder, newName, null); if (!ok) { - SystemMessage msg = SystemPlugin.getPluginMessage(FILEMSG_COPY_FILE_FAILED); + SystemMessage msg = RSEUIPlugin.getPluginMessage(FILEMSG_COPY_FILE_FAILED); msg.makeSubstitution(srcFileOrFolder.getName()); throw new SystemMessageException(msg); } @@ -330,13 +330,13 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction dlg.setSystemConnection(sourceConnection); if (mode==MODE_MOVE) dlg.setSelectionValidator(this); - //SystemPlugin.logInfo("Calling getParentRemoteFile for '"+firstSelection.getAbsolutePath()+"'"); + //RSEUIPlugin.logInfo("Calling getParentRemoteFile for '"+firstSelection.getAbsolutePath()+"'"); firstSelectionParent = firstSelection.getParentRemoteFile(); /* if (firstSelectionParent != null) - SystemPlugin.logInfo("Result of getParentRemoteFile: '"+firstSelectionParent.getAbsolutePath()+"'"); + RSEUIPlugin.logInfo("Result of getParentRemoteFile: '"+firstSelectionParent.getAbsolutePath()+"'"); else - SystemPlugin.logInfo("Result of getParentRemoteFile: null"); + RSEUIPlugin.logInfo("Result of getParentRemoteFile: null"); */ dlg.setPreSelection(firstSelectionParent); @@ -398,7 +398,7 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction } } } - SystemPlugin.getTheSystemRegistry().fireRemoteResourceChangeEvent( + RSEUIPlugin.getTheSystemRegistry().fireRemoteResourceChangeEvent( ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED, copiedFiles, targetFolder.getAbsolutePath(), fileSS, null, originatingViewer); /* Old release 1.0 way... @@ -408,7 +408,7 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction Viewer v = getViewer(); if (v instanceof ISystemTree) { - SystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); ISystemTree tree = (ISystemTree)v; Object parent = tree.getSelectedParent(); if (parent == null) diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCreateEditActions.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCreateEditActions.java index 97992c79270..6c14cd9d39d 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCreateEditActions.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemCreateEditActions.java @@ -26,11 +26,11 @@ import org.eclipse.core.resources.IFile; import org.eclipse.jface.action.IAction; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemSeparatorAction; import org.eclipse.swt.widgets.Shell; @@ -109,7 +109,7 @@ public class SystemCreateEditActions protected IEditorRegistry getEditorRegistry() { - return SystemPlugin.getDefault().getWorkbench().getEditorRegistry(); + return RSEUIPlugin.getDefault().getWorkbench().getEditorRegistry(); } protected IEditorDescriptor getDefaultTextEditor() diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemDoubleClickEditAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemDoubleClickEditAction.java index 0da3b5e3f42..cd963746b56 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemDoubleClickEditAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemDoubleClickEditAction.java @@ -17,8 +17,8 @@ package org.eclipse.rse.files.ui.actions; import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.ui.IEditorDescriptor; import org.eclipse.ui.IEditorRegistry; @@ -42,7 +42,7 @@ public class SystemDoubleClickEditAction extends SystemBaseAction protected IEditorRegistry getEditorRegistry() { - return SystemPlugin.getDefault().getWorkbench().getEditorRegistry(); + return RSEUIPlugin.getDefault().getWorkbench().getEditorRegistry(); } protected IEditorDescriptor getDefaultTextEditor() diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemDownloadConflictAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemDownloadConflictAction.java index 2116c36dfeb..d600e3899d2 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemDownloadConflictAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemDownloadConflictAction.java @@ -19,10 +19,10 @@ package org.eclipse.rse.files.ui.actions; import org.eclipse.core.resources.IFile; import org.eclipse.jface.window.Window; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.resources.SystemIFileProperties; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.rse.ui.dialogs.SystemPromptDialog; import org.eclipse.swt.SWT; @@ -252,7 +252,7 @@ public class SystemDownloadConflictAction extends SystemBaseAction implements Ru dlg.setReplaceText(FileResources.RESID_CONFLICT_DOWNLOAD_REPLACELOCAL); dlg.setOpenLocalText(FileResources.RESID_CONFLICT_DOWNLOAD_OPENWITHLOCAL); - dlg.setHelpId(SystemPlugin.HELPPREFIX + "lcdl0000"); + dlg.setHelpId(RSEUIPlugin.HELPPREFIX + "lcdl0000"); return dlg; } @@ -261,7 +261,7 @@ public class SystemDownloadConflictAction extends SystemBaseAction implements Ru */ public void run() { - setShell(SystemPlugin.getTheSystemRegistry().getShell()); + setShell(RSEUIPlugin.getTheSystemRegistry().getShell()); SystemIFileProperties properties = new SystemIFileProperties(_tempFile); DownloadConflictDialog cnfDialog = getConflictDialog(); diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFileInPlaceAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFileInPlaceAction.java index 348501facbf..073e5a85a77 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFileInPlaceAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFileInPlaceAction.java @@ -19,10 +19,10 @@ package org.eclipse.rse.files.ui.actions; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.resources.ISystemRemoteEditConstants; import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.swt.widgets.Shell; @@ -31,7 +31,7 @@ public class SystemEditFileInPlaceAction extends SystemBaseAction implements ISy - private SystemPlugin plugin; + private RSEUIPlugin plugin; /** @@ -53,7 +53,7 @@ public class SystemEditFileInPlaceAction extends SystemBaseAction implements ISy // had to add it in the group in the adapter // setContextMenuGroup(ISystemContextMenuConstants.GROUP_OPENWITH); - plugin = SystemPlugin.getDefault(); + plugin = RSEUIPlugin.getDefault(); } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFilePlatformAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFilePlatformAction.java index b6d5c99aede..85978203232 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFilePlatformAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditFilePlatformAction.java @@ -19,10 +19,10 @@ package org.eclipse.rse.files.ui.actions; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.resources.ISystemRemoteEditConstants; import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.swt.widgets.Shell; @@ -31,7 +31,7 @@ public class SystemEditFilePlatformAction extends SystemBaseAction implements IS - private SystemPlugin plugin; + private RSEUIPlugin plugin; /** @@ -53,7 +53,7 @@ public class SystemEditFilePlatformAction extends SystemBaseAction implements IS // had to add it in the group in the adapter // setContextMenuGroup(ISystemContextMenuConstants.GROUP_OPENWITH); - plugin = SystemPlugin.getDefault(); + plugin = RSEUIPlugin.getDefault(); } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditProjectFileLineAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditProjectFileLineAction.java index 67ba2cddb00..1269cf67c64 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditProjectFileLineAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemEditProjectFileLineAction.java @@ -24,12 +24,12 @@ import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; import org.eclipse.debug.core.sourcelookup.containers.ProjectSourceContainer; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.resources.RemoteSourceLookupDirector; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell; import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteError; import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteOutput; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IEditorDescriptor; import org.eclipse.ui.IEditorPart; @@ -78,7 +78,7 @@ public class SystemEditProjectFileLineAction extends SystemEditFileAction { protected IEditorRegistry getEditorRegistry() { - return SystemPlugin.getDefault().getWorkbench().getEditorRegistry(); + return RSEUIPlugin.getDefault().getWorkbench().getEditorRegistry(); } protected IEditorDescriptor getDefaultTextEditor() 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 37dc15561dd..f90a95ed2f0 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 @@ -26,7 +26,6 @@ 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.SystemPlugin; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemRemoteChangeEvents; @@ -38,6 +37,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.rse.ui.view.ISystemDragDropAdapter; @@ -64,8 +64,8 @@ public class SystemExtractAction extends SystemBaseAction _selected = new ArrayList(); _parent = parent; allowOnMultipleSelection(true); - setHelp(SystemPlugin.HELPPREFIX + "actn0118"); - setImageDescriptor(SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_EXTRACT_ID)); + setHelp(RSEUIPlugin.HELPPREFIX + "actn0118"); + setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_EXTRACT_ID)); } public SystemExtractAction(Shell parent, String label, String tooltip) @@ -76,8 +76,8 @@ public class SystemExtractAction extends SystemBaseAction _selected = new ArrayList(); _parent = parent; allowOnMultipleSelection(true); - setHelp(SystemPlugin.HELPPREFIX + "actn0118"); - setImageDescriptor(SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_EXTRACT_ID)); + setHelp(RSEUIPlugin.HELPPREFIX + "actn0118"); + setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_EXTRACT_ID)); } @@ -118,7 +118,7 @@ public class SystemExtractAction extends SystemBaseAction { } // always refresh - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); registry.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED, destination, destinationParent, ss, null, null); registry.fireEvent(new SystemResourceChangeEvent(destination, ISystemResourceChangeEvents.EVENT_REFRESH, destinationParent)); } @@ -161,7 +161,7 @@ public class SystemExtractAction extends SystemBaseAction } catch (Exception e) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_FAILED); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_FAILED); SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg); dlg.open(); System.out.println(e.getMessage()); @@ -247,7 +247,7 @@ public class SystemExtractAction extends SystemBaseAction protected IRunnableContext getRunnableContext(Shell shell) { - IRunnableContext irc = SystemPlugin.getTheSystemRegistry().getRunnableContext(); + IRunnableContext irc = RSEUIPlugin.getTheSystemRegistry().getRunnableContext(); if (irc != null) { return irc; 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 fd5758330e6..64e30c77f99 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 @@ -16,8 +16,7 @@ package org.eclipse.rse.files.ui.actions; import org.eclipse.jface.operation.IRunnableContext; -import org.eclipse.rse.core.ISystemTypes; -import org.eclipse.rse.core.SystemPlugin; +import org.eclipse.rse.core.IRSESystemType; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.resources.ExtractToDialog; import org.eclipse.rse.model.IHost; @@ -30,6 +29,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.rse.ui.validators.IValidatorRemoteSelection; import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; @@ -44,13 +44,13 @@ import org.eclipse.swt.widgets.Shell; */ public class SystemExtractToAction extends SystemExtractAction implements IValidatorRemoteSelection, ISystemMessages { - protected static final String[] systemTypes = { ISystemTypes.SYSTEMTYPE_LOCAL, - ISystemTypes.SYSTEMTYPE_WINDOWS, - ISystemTypes.SYSTEMTYPE_LINUX, - ISystemTypes.SYSTEMTYPE_POWER_LINUX, - ISystemTypes.SYSTEMTYPE_UNIX, - ISystemTypes.SYSTEMTYPE_AIX, - ISystemTypes.SYSTEMTYPE_ISERIES + protected static final String[] systemTypes = { IRSESystemType.SYSTEMTYPE_LOCAL, + IRSESystemType.SYSTEMTYPE_WINDOWS, + IRSESystemType.SYSTEMTYPE_LINUX, + IRSESystemType.SYSTEMTYPE_POWER_LINUX, + IRSESystemType.SYSTEMTYPE_UNIX, + IRSESystemType.SYSTEMTYPE_AIX, + IRSESystemType.SYSTEMTYPE_ISERIES }; protected SystemMessage targetDescendsFromSrcMsg = null; protected int currentlyProcessingSelection = 0; @@ -58,16 +58,16 @@ public class SystemExtractToAction extends SystemExtractAction implements IValid public SystemExtractToAction(Shell parent) { super(parent,FileResources.ACTION_EXTRACT_TO_LABEL, FileResources.ACTION_EXTRACT_TO_TOOLTIP); - setHelp(SystemPlugin.HELPPREFIX + "actn0119"); - setImageDescriptor(SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_EXTRACTTO_ID)); + setHelp(RSEUIPlugin.HELPPREFIX + "actn0119"); + setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_EXTRACTTO_ID)); } public SystemExtractToAction(Shell parent, String label, String tooltip) { super(parent, label, tooltip); - setHelp(SystemPlugin.HELPPREFIX + "actn0119"); - setImageDescriptor(SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_EXTRACTTO_ID)); + setHelp(RSEUIPlugin.HELPPREFIX + "actn0119"); + setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_EXTRACTTO_ID)); } public void run() @@ -122,7 +122,7 @@ public class SystemExtractToAction extends SystemExtractAction implements IValid } if (selection.isAncestorOf(destination)) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_DEST_NOT_IN_SOURCE); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DEST_NOT_IN_SOURCE); SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg); dlg.open(); i--; @@ -130,7 +130,7 @@ public class SystemExtractToAction extends SystemExtractAction implements IValid } if (!destination.canWrite()) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_DEST_TARGET_READONLY); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DEST_TARGET_READONLY); SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg); dlg.open(); i--; @@ -153,7 +153,7 @@ public class SystemExtractToAction extends SystemExtractAction implements IValid { } // always refresh - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry 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())); } @@ -189,7 +189,7 @@ public class SystemExtractToAction extends SystemExtractAction implements IValid if (selectedFolder.isDescendantOf(currentSelection)) { if (targetDescendsFromSrcMsg == null) - targetDescendsFromSrcMsg = SystemPlugin.getPluginMessage(FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOUCE); + targetDescendsFromSrcMsg = RSEUIPlugin.getPluginMessage(FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOUCE); return targetDescendsFromSrcMsg; } else diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemMoveRemoteFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemMoveRemoteFileAction.java index c7952b419c4..e2ac52b3557 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,7 +18,6 @@ package org.eclipse.rse.files.ui.actions; import java.util.Vector; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.model.IHost; import org.eclipse.rse.model.ISystemRemoteChangeEvents; @@ -27,6 +26,7 @@ import org.eclipse.rse.services.clientserver.messages.SystemMessageException; 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; @@ -49,8 +49,8 @@ public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction public SystemMoveRemoteFileAction(Shell shell) { super(shell, MODE_MOVE); - setHelp(SystemPlugin.HELPPREFIX+"actn0111"); - setDialogHelp(SystemPlugin.HELPPREFIX+"dmrf0000"); + setHelp(RSEUIPlugin.HELPPREFIX+"actn0111"); + setDialogHelp(RSEUIPlugin.HELPPREFIX+"dmrf0000"); } // -------------------------- @@ -87,7 +87,7 @@ public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction ok = ss.move(srcFileOrFolder, targetFolder, newName, monitor); if (!ok) { - SystemMessage msg = SystemPlugin.getPluginMessage(FILEMSG_MOVE_FILE_FAILED); + SystemMessage msg = RSEUIPlugin.getPluginMessage(FILEMSG_MOVE_FILE_FAILED); msg.makeSubstitution(srcFileOrFolder.getName()); throw new SystemMessageException(msg); } @@ -120,19 +120,19 @@ public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction if (selectedFolder.getAbsolutePath().equals(firstSelectionParent.getAbsolutePath())) { if (targetEqualsSrcMsg == null) - targetEqualsSrcMsg = SystemPlugin.getPluginMessage(FILEMSG_MOVE_TARGET_EQUALS_SOURCE); + targetEqualsSrcMsg = RSEUIPlugin.getPluginMessage(FILEMSG_MOVE_TARGET_EQUALS_SOURCE); return targetEqualsSrcMsg; } else if (selectedFolder.getAbsolutePath().equals(firstSelection.getAbsolutePath())) { if (targetEqualsSrcMsg == null) - targetEqualsSrcMsg = SystemPlugin.getPluginMessage(FILEMSG_MOVE_TARGET_EQUALS_SOURCE); // todo: different msg + targetEqualsSrcMsg = RSEUIPlugin.getPluginMessage(FILEMSG_MOVE_TARGET_EQUALS_SOURCE); // todo: different msg return targetEqualsSrcMsg; } else if (selectedFolder.isDescendantOf(firstSelection)) { if (targetDescendsFromSrcMsg == null) - targetDescendsFromSrcMsg = SystemPlugin.getPluginMessage(FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOUCE); + targetDescendsFromSrcMsg = RSEUIPlugin.getPluginMessage(FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOUCE); return targetDescendsFromSrcMsg; } else @@ -150,16 +150,16 @@ public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction // refresh all instances of the source parent, and all affected filters... ISubSystem fileSS = targetFolder.getParentRemoteFileSubSystem(); - //SystemPlugin.getTheSystemRegistry().fireRemoteResourceChangeEvent( + //RSEUIPlugin.getTheSystemRegistry().fireRemoteResourceChangeEvent( // ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED, copiedFiles, firstSelectionParent.getAbsolutePath(), fileSS, null, null); - SystemPlugin.getTheSystemRegistry().fireRemoteResourceChangeEvent( + RSEUIPlugin.getTheSystemRegistry().fireRemoteResourceChangeEvent( ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED, movedFiles, firstSelectionParent.getAbsolutePath(), fileSS, null, null); /* old release 1.0 way of doing it... Viewer v = getViewer(); if (v instanceof ISystemTree) { - SystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); ISystemTree tree = (ISystemTree)v; Object parent = tree.getSelectedParent(); if (parent != null) @@ -185,7 +185,7 @@ public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction } } else - SystemPlugin.logWarning("Hmm, selected parent is null on a move operation!"); + RSEUIPlugin.logWarning("Hmm, selected parent is null on a move operation!"); }*/ super.copyComplete(); } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFileAction.java index 61dba9137d0..b8887a5b320 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFileAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFileAction.java @@ -17,10 +17,10 @@ package org.eclipse.rse.files.ui.actions; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.wizard.IWizard; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.wizards.SystemNewFileWizard; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseWizardAction; import org.eclipse.swt.widgets.Shell; @@ -41,7 +41,7 @@ public class SystemNewFileAction extends SystemBaseWizardAction this(SystemResources.ACTION_NEWFILE_LABEL, SystemResources.ACTION_NEWFILE_TOOLTIP, //PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FILE), - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILE_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILE_ID), parent); } 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 069ea06a106..688136c187d 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,12 +15,12 @@ ********************************************************************************/ package org.eclipse.rse.files.ui.actions; -import org.eclipse.rse.core.SystemPlugin; 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; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.filters.actions.SystemNewFilterAction; import org.eclipse.rse.ui.filters.dialogs.SystemNewFilterWizard; import org.eclipse.swt.widgets.Shell; @@ -43,12 +43,12 @@ public class SystemNewFileFilterAction { super(shell, parentPool, SystemFileResources.ACTION_NEWFILTER_LABEL, SystemFileResources.ACTION_NEWFILTER_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTER_ID)); + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTER_ID)); - //setHelp(SystemPlugin.HELPPREFIX+"anff0000"); - //setDialogHelp(SystemPlugin.HELPPREFIX+"wnff0000"); - setHelp(SystemPlugin.HELPPREFIX+"actn0042"); - setDialogHelp(SystemPlugin.HELPPREFIX+"wnfr0000"); + //setHelp(RSEUIPlugin.HELPPREFIX+"anff0000"); + //setDialogHelp(RSEUIPlugin.HELPPREFIX+"wnff0000"); + setHelp(RSEUIPlugin.HELPPREFIX+"actn0042"); + setDialogHelp(RSEUIPlugin.HELPPREFIX+"wnfr0000"); } /** @@ -74,7 +74,7 @@ public class SystemNewFileFilterAction { // configuration that used to only be possible via subclasses... wizard.setWizardPageTitle(SystemFileResources.RESID_NEWFILEFILTER_PAGE1_TITLE); - wizard.setWizardImage(SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTERWIZARD_ID)); + wizard.setWizardImage(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTERWIZARD_ID)); wizard.setPage1Description(SystemFileResources.RESID_NEWFILEFILTER_PAGE1_DESCRIPTION); wizard.setFilterStringEditPane(new SystemFileFilterStringEditPane(wizard.getShell())); } 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 8813be3e93e..00ea4f2e29c 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,13 +19,13 @@ package org.eclipse.rse.files.ui.actions; import java.util.Iterator; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.filters.ISystemFilterPool; import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem; import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFile; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.filters.dialogs.SystemNewFilterWizard; import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; import org.eclipse.swt.widgets.Shell; @@ -46,7 +46,7 @@ public class SystemNewFileFilterFromFolderAction extends SystemNewFileFilterActi { // initially use null, but update based on selection super(null, null, parent); - setHelp(SystemPlugin.HELPPREFIX+"actn0112"); + setHelp(RSEUIPlugin.HELPPREFIX+"actn0112"); } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFolderAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFolderAction.java index 2d758bef356..c45e0216344 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFolderAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemNewFolderAction.java @@ -18,11 +18,11 @@ package org.eclipse.rse.files.ui.actions; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.wizard.IWizard; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.wizards.SystemNewFolderWizard; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.actions.SystemBaseWizardAction; import org.eclipse.swt.widgets.Shell; @@ -41,7 +41,7 @@ public class SystemNewFolderAction extends SystemBaseWizardAction { this(FileResources.ACTION_NEWFOLDER_LABEL, FileResources.ACTION_NEWFOLDER_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFOLDER_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFOLDER_ID), parent); } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileLineOpenWithMenu.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileLineOpenWithMenu.java index d6d461c4086..06b137987bd 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileLineOpenWithMenu.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileLineOpenWithMenu.java @@ -23,7 +23,6 @@ import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; import org.eclipse.debug.core.sourcelookup.containers.ProjectSourceContainer; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.IRemoteLineReference; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.resources.ISystemTextEditor; @@ -37,6 +36,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem; import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell; import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteError; import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteOutput; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Event; @@ -104,7 +104,7 @@ public class SystemRemoteFileLineOpenWithMenu extends SystemRemoteFileOpenWithMe protected IEditorRegistry getEditorRegistry() { - return SystemPlugin.getDefault().getWorkbench().getEditorRegistry(); + return RSEUIPlugin.getDefault().getWorkbench().getEditorRegistry(); } protected IEditorDescriptor getDefaultTextEditor() diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileOpenWithMenu.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileOpenWithMenu.java index e2d27632ef5..89d6a082c3a 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileOpenWithMenu.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemRemoteFileOpenWithMenu.java @@ -27,11 +27,11 @@ import org.eclipse.jface.action.ContributionItem; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile; import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Event; @@ -244,7 +244,7 @@ protected void setDefaultEditor(IRemoteFile remoteFile, String editorId) protected IEditorRegistry getEditorRegistry() { - return SystemPlugin.getDefault().getWorkbench().getEditorRegistry(); + return RSEUIPlugin.getDefault().getWorkbench().getEditorRegistry(); } protected IEditorDescriptor getDefaultTextEditor() 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 8be372ed04a..6a3501f38b5 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 @@ -147,7 +147,7 @@ public class SystemRemoteFileSelectAction extends SystemBaseDialogAction * connections they can create. * @param systemTypes An array of system type names * - * @see org.eclipse.rse.core.ISystemTypes + * @see org.eclipse.rse.core.IRSESystemType */ public void setSystemTypes(String[] systemTypes) { @@ -159,7 +159,7 @@ public class SystemRemoteFileSelectAction extends SystemBaseDialogAction * * @param systemType The name of the system type to restrict to * - * @see org.eclipse.rse.core.ISystemTypes + * @see org.eclipse.rse.core.IRSESystemType */ public void setSystemType(String systemType) { diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSearchAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSearchAction.java index b366dc4aabc..9cd61b0e349 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSearchAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSearchAction.java @@ -17,9 +17,9 @@ package org.eclipse.rse.files.ui.actions; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.search.SystemSearchPage; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.search.ui.NewSearchUI; @@ -31,9 +31,9 @@ public class SystemSearchAction extends SystemBaseAction { public SystemSearchAction(Shell parent) { super(SystemResources.ACTION_SEARCH_LABEL, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SEARCH_ID), parent); + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SEARCH_ID), parent); setToolTipText(SystemResources.ACTION_SEARCH_TOOLTIP); - setHelp(SystemPlugin.HELPPREFIX + "rsdi0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "rsdi0000"); allowOnMultipleSelection(false); } 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 b04151ce285..07f6d2c0a20 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 @@ -134,7 +134,7 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction * connections they can create. * @param systemTypes An array of system type names * - * @see org.eclipse.rse.core.ISystemTypes + * @see org.eclipse.rse.core.IRSESystemType */ public void setSystemTypes(String[] systemTypes) { @@ -146,7 +146,7 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction * * @param systemType The name of the system type to restrict to * - * @see org.eclipse.rse.core.ISystemTypes + * @see org.eclipse.rse.core.IRSESystemType */ public void setSystemType(String systemType) { 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 8b9f908f11f..55eff4d3112 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 @@ -149,7 +149,7 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction * connections they can create. * @param systemTypes An array of system type names * - * @see org.eclipse.rse.core.ISystemTypes + * @see org.eclipse.rse.core.IRSESystemType */ public void setSystemTypes(String[] systemTypes) { @@ -161,7 +161,7 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction * * @param systemType The name of the system type to restrict to * - * @see org.eclipse.rse.core.ISystemTypes + * @see org.eclipse.rse.core.IRSESystemType */ public void setSystemType(String systemType) { diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemUploadConflictAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemUploadConflictAction.java index dc05ee91aef..1adbedaf44c 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemUploadConflictAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemUploadConflictAction.java @@ -19,7 +19,6 @@ package org.eclipse.rse.files.ui.actions; import org.eclipse.core.resources.IFile; import org.eclipse.jface.window.Window; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.resources.ISaveAsDialog; import org.eclipse.rse.files.ui.resources.SaveAsDialog; @@ -34,6 +33,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem; import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileIOException; import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSecurityException; 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.dialogs.SystemPromptDialog; @@ -237,7 +237,7 @@ public class SystemUploadConflictAction extends SystemBaseAction implements Runn else { enableOkButton(false); - _errorMessage = SystemPlugin.getPluginMessage(MSG_VALIDATE_PATH_EMPTY); + _errorMessage = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_PATH_EMPTY); setErrorMessage(_errorMessage); } } @@ -303,7 +303,7 @@ public class SystemUploadConflictAction extends SystemBaseAction implements Runn private void setHelp() { - setHelp(SystemPlugin.HELPPREFIX + "scdl0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "scdl0000"); } } @@ -370,7 +370,7 @@ public class SystemUploadConflictAction extends SystemBaseAction implements Runn try { _saveasFile = _saveasFile.getParentRemoteFileSubSystem().getRemoteFileObject(_saveasFile.getAbsolutePath()); - SystemPlugin.getTheSystemRegistry().fireEvent(new SystemResourceChangeEvent(_saveasFile.getParentRemoteFile(), ISystemResourceChangeEvents.EVENT_REFRESH, null)); + RSEUIPlugin.getTheSystemRegistry().fireEvent(new SystemResourceChangeEvent(_saveasFile.getParentRemoteFile(), ISystemResourceChangeEvents.EVENT_REFRESH, null)); } catch (SystemMessageException e) @@ -502,7 +502,7 @@ public class SystemUploadConflictAction extends SystemBaseAction implements Runn catch (SystemMessageException e) { SystemBasePlugin.logError("Error in performSaveAs", e); - SystemMessage message = SystemPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED); + SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED); SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message); dialog.open(); return; 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 ffa9c227964..37ac18bdeae 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,12 +15,12 @@ ********************************************************************************/ package org.eclipse.rse.files.ui.dialogs; -import org.eclipse.rse.core.SystemPlugin; 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.RSEUIPlugin; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.dialogs.SystemPromptDialog; import org.eclipse.swt.SWT; @@ -84,7 +84,7 @@ public class SystemPromptForHomeFolderDialog boolean readOnly = false; folderCombo = new SystemRemoteFolderCombo(composite_prompts, SWT.BORDER, null, readOnly); folderCombo.setSystemConnection(connection); - folderCombo.setText("/home/"+SystemPlugin.getLocalMachineName()); + folderCombo.setText("/home/"+RSEUIPlugin.getLocalMachineName()); // listen for selections //folderCombo.addSelectionListener(this); 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 a515464df5e..1694fc5e55e 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 @@ -135,7 +135,7 @@ public class SystemSelectRemoteFileOrFolderDialog * Restrict to certain system types * @param systemTypes the system types to restrict what connections are shown and what types of connections * the user can create - * @see org.eclipse.rse.core.ISystemTypes + * @see org.eclipse.rse.core.IRSESystemType */ public void setSystemTypes(String[] systemTypes) { 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 a4515e7de6e..446b4158baa 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,13 +19,13 @@ package org.eclipse.rse.files.ui.propertypages; import java.util.ArrayList; import java.util.List; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.servicesubsystem.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; import org.eclipse.rse.ui.propertypages.ServicesPropertyPage; import org.eclipse.rse.ui.widgets.services.FactoryServiceElement; import org.eclipse.rse.ui.widgets.services.ServiceElement; @@ -68,7 +68,7 @@ public class FileServicesPropertyPage extends ServicesPropertyPage protected IFileServiceSubSystemConfiguration[] getFileServiceSubSystemFactories(String systemType) { List results = new ArrayList(); - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); ISubSystemConfiguration[] factories = sr.getSubSystemConfigurationsBySystemType(systemType); for (int i = 0; i < factories.length; i++) 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 3d3933a51c9..2260a60d0f2 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 @@ -34,7 +34,6 @@ 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.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.resources.SystemIFileProperties; @@ -45,6 +44,7 @@ import org.eclipse.rse.ui.GenericMessages; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.ISystemPreferencesConstants; import org.eclipse.rse.ui.Mnemonics; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.rse.ui.view.ISystemEditableRemoteObject; @@ -95,7 +95,7 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe public SystemCachePreferencePage() { super(); - setPreferenceStore(SystemPlugin.getDefault().getPreferenceStore()); + setPreferenceStore(RSEUIPlugin.getDefault().getPreferenceStore()); setDescription(FileResources.RESID_PREF_CACHE_DESCRIPTION); } @@ -186,7 +186,7 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe FileResources.RESID_PREF_CACHE_CLEAR_WARNING_DESCRIPTION); (new Mnemonics()).setOnPreferencePage(true).setMnemonics(parent); - SystemWidgetHelpers.setCompositeHelp(parent, SystemPlugin.HELPPREFIX + "fchp0000"); + SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "fchp0000"); initControls(); return parent; @@ -194,7 +194,7 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe private void initControls() { - IPreferenceStore store = SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore(); boolean enableMaxSize = store.getBoolean(ISystemPreferencesConstants.LIMIT_CACHE); _maxCacheSize.setEnabled(enableMaxSize); @@ -223,7 +223,7 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe { super.performDefaults(); - IPreferenceStore store = SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore(); boolean enableMaxSize = store.getDefaultBoolean(ISystemPreferencesConstants.LIMIT_CACHE); _maxCacheCheckbox.setSelection(enableMaxSize); @@ -248,7 +248,7 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe */ public boolean performOk() { - IPreferenceStore store = SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore(); String size = _maxCacheSize.getText(); if (size == null || size.trim().equals("")) { @@ -341,7 +341,7 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe protected IRunnableContext getRunnableContext(Shell shell) { - IRunnableContext irc = SystemPlugin.getTheSystemRegistry().getRunnableContext(); + IRunnableContext irc = RSEUIPlugin.getTheSystemRegistry().getRunnableContext(); if (irc != null) { return irc; @@ -420,7 +420,7 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe else if (properties.getDownloadFileTimeStamp() != child.getLocalTimeStamp()) { String ssString = properties.getRemoteFileSubSystem(); - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); ISubSystem subsystem = registry.getSubSystem(ssString); if (subsystem != null) { @@ -532,7 +532,7 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe else { String ssString = properties.getRemoteFileSubSystem(); - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); ISubSystem subsystem = registry.getSubSystem(ssString); if (subsystem != null) { @@ -599,7 +599,7 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe List dirtyEditors = new ArrayList(); if (!getDirtyReplicas(dirtyEditors)) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_CACHE_UNABLE_TO_SYNCH); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CACHE_UNABLE_TO_SYNCH); SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg); dlg.open(); @@ -617,7 +617,7 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe WorkbenchContentProvider cprovider = new WorkbenchContentProvider(); SystemTableViewProvider lprovider = new SystemTableViewProvider(); - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_CACHE_UPLOAD_BEFORE_DELETE); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CACHE_UPLOAD_BEFORE_DELETE); ListSelectionDialog dlg = new ListSelectionDialog(getShell(), input, cprovider, lprovider, msg.getLevelOneText()); diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemFilePropertyPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemFilePropertyPage.java index e57d0602f56..a86642609b7 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemFilePropertyPage.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemFilePropertyPage.java @@ -19,7 +19,6 @@ import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.ISystemResourceChangeEvents; import org.eclipse.rse.subsystems.files.core.SystemFileResources; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; @@ -27,6 +26,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IVirtualRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileIOException; import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSecurityException; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage; import org.eclipse.swt.events.SelectionEvent; @@ -61,7 +61,7 @@ public class SystemFilePropertyPage extends SystemBasePropertyPage public SystemFilePropertyPage() { super(); - SystemPlugin sp = SystemPlugin.getDefault(); + RSEUIPlugin sp = RSEUIPlugin.getDefault(); } /** * Create the page's GUI contents. @@ -258,16 +258,16 @@ public class SystemFilePropertyPage extends SystemBasePropertyPage try { getRemoteFile().getParentRemoteFileSubSystem().setReadOnly(getRemoteFile()); - SystemPlugin.getTheSystemRegistry().fireEvent( + RSEUIPlugin.getTheSystemRegistry().fireEvent( new org.eclipse.rse.model.SystemResourceChangeEvent( getRemoteFile(),ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE,null)); } catch (RemoteFileIOException exc) { - setMessage(SystemPlugin.getPluginMessage(ISystemMessages.FILEMSG_IO_ERROR)); + setMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_IO_ERROR)); } catch (RemoteFileSecurityException exc) { - setMessage(SystemPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR)); + setMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR)); } //catch (RemoteFileException e) //{ diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/UniversalPreferencePage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/UniversalPreferencePage.java index b11e5bb2b36..a208feb1cfa 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/UniversalPreferencePage.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/UniversalPreferencePage.java @@ -29,7 +29,6 @@ import org.eclipse.jface.viewers.ColumnPixelData; import org.eclipse.jface.viewers.ColumnWeightData; import org.eclipse.jface.viewers.TableLayout; import org.eclipse.jface.window.Window; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager; import org.eclipse.rse.services.clientserver.messages.SystemMessage; @@ -39,6 +38,7 @@ import org.eclipse.rse.subsystems.files.core.model.SystemFileTransferModeRegistr import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.ISystemPreferencesConstants; import org.eclipse.rse.ui.Mnemonics; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.swt.SWT; @@ -113,7 +113,7 @@ public class UniversalPreferencePage */ public UniversalPreferencePage() { super(GRID); - setPreferenceStore(SystemPlugin.getDefault().getPreferenceStore()); + setPreferenceStore(RSEUIPlugin.getDefault().getPreferenceStore()); setDescription(FileResources.RESID_PREF_UNIVERSAL_FILES_TITLE); } @@ -130,7 +130,7 @@ public class UniversalPreferencePage protected void createFieldEditors() { modeRegistry = (SystemFileTransferModeRegistry)(SystemFileTransferModeRegistry.getDefault()); - editorRegistry = (IEditorRegistry)(SystemPlugin.getDefault().getWorkbench().getEditorRegistry()); + editorRegistry = (IEditorRegistry)(RSEUIPlugin.getDefault().getWorkbench().getEditorRegistry()); modeMappings = new ArrayList(); editorMappings = new ArrayList(); @@ -270,7 +270,7 @@ public class UniversalPreferencePage addField(showHiddenEditor); - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); // download and upload buffer size @@ -381,7 +381,7 @@ public class UniversalPreferencePage updateEnabledState(); (new Mnemonics()).setOnPreferencePage(true).setMnemonics(parent); - SystemWidgetHelpers.setCompositeHelp(parent, SystemPlugin.HELPPREFIX+"ufpf0000"); + SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX+"ufpf0000"); } @@ -627,7 +627,7 @@ public class UniversalPreferencePage // no extension is provided if (newExtension == null || newExtension.length() < 1) { // Note by DWD - this path is never taken because the dialog that gathers resource types checks for this condition - SystemMessageFile mf = SystemPlugin.getPluginMessageFile(); + SystemMessageFile mf = RSEUIPlugin.getPluginMessageFile(); Shell shell = getControl().getShell(); SystemMessage message = mf.getMessage(ISystemMessages.MSG_ERROR_EXTENSION_EMPTY); SystemMessageDialog.displayErrorMessage(shell, message); @@ -649,7 +649,7 @@ public class UniversalPreferencePage // if the name is more than one character, and it has a '*' in it if (!(index == 0 && newName.length() == 1)) { // Note by DWD - this path is never taken because the dialog that gathers resource types checks for this condition. - SystemMessageFile mf = SystemPlugin.getPluginMessageFile(); + SystemMessageFile mf = RSEUIPlugin.getPluginMessageFile(); Shell shell = getControl().getShell(); SystemMessage message = mf.getMessage(ISystemMessages.MSG_ERROR_FILENAME_INVALID); SystemMessageDialog.displayErrorMessage(shell, message); @@ -824,7 +824,7 @@ public class UniversalPreferencePage */ public static int getFileTransferModeDefaultPreference() { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); return store.getInt(ISystemPreferencesConstants.FILETRANSFERMODEDEFAULT); } /** @@ -832,7 +832,7 @@ public class UniversalPreferencePage */ public static void setFileTransferModeDefaultPreference(int defaultMode) { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); store.setValue(ISystemPreferencesConstants.FILETRANSFERMODEDEFAULT,defaultMode); savePreferenceStore(); } @@ -842,7 +842,7 @@ public class UniversalPreferencePage */ public static String getSuperTransferTypePreference() { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); return store.getString(ISystemPreferencesConstants.SUPERTRANSFER_ARC_TYPE); } /** @@ -850,20 +850,20 @@ public class UniversalPreferencePage */ public static void setSuperTransferTypePreference(String type) { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); store.setValue(ISystemPreferencesConstants.SUPERTRANSFER_ARC_TYPE,type); savePreferenceStore(); } public static boolean getDoSuperTransfer() { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); return store.getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER); } public static int getDownloadBufferSize() { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); int result = store.getInt(ISystemPreferencesConstants.DOWNLOAD_BUFFER_SIZE); if (result == 0) { @@ -874,7 +874,7 @@ public class UniversalPreferencePage public static int getUploadBufferSize() { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); int result = store.getInt(ISystemPreferencesConstants.UPLOAD_BUFFER_SIZE); if (result == 0) { @@ -885,7 +885,7 @@ public class UniversalPreferencePage public static void setDoSuperTransfer(boolean flag) { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); store.setValue(ISystemPreferencesConstants.DOSUPERTRANSFER,flag); savePreferenceStore(); } @@ -904,7 +904,7 @@ public class UniversalPreferencePage { if (size > 0) { - IPreferenceStore store = SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore(); store.setValue(ISystemPreferencesConstants.DOWNLOAD_BUFFER_SIZE, size); savePreferenceStore(); } @@ -914,7 +914,7 @@ public class UniversalPreferencePage { if (size > 0) { - IPreferenceStore store = SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore(); store.setValue(ISystemPreferencesConstants.UPLOAD_BUFFER_SIZE, size); savePreferenceStore(); } @@ -927,7 +927,7 @@ public class UniversalPreferencePage { /* DY: This was causing ClassCastException in 2.0 * getPreferenceStore retutrns CompatibilityPreferenceStore now - PreferenceStore store = (PreferenceStore)SystemPlugin.getDefault().getPreferenceStore(); + PreferenceStore store = (PreferenceStore)RSEUIPlugin.getDefault().getPreferenceStore(); try { store.save(); } catch (Exception exc) @@ -937,7 +937,7 @@ public class UniversalPreferencePage */ // ok, a couple hours of research leads me to believe this is now the new // thing to do... phil - SystemPlugin.getDefault().savePluginPreferences(); + RSEUIPlugin.getDefault().savePluginPreferences(); } /** diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/AddToArchiveDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/AddToArchiveDialog.java index 904e4ea35d9..d48be509841 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/AddToArchiveDialog.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/AddToArchiveDialog.java @@ -15,8 +15,8 @@ ********************************************************************************/ package org.eclipse.rse.files.ui.resources; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.widgets.Shell; @@ -33,18 +33,18 @@ public class AddToArchiveDialog extends CombineDialog { public AddToArchiveDialog(Shell shell) { super(shell); - setHelp(SystemPlugin.HELPPREFIX + "atad0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "atad0000"); } public AddToArchiveDialog(Shell shell, String title) { super(shell, title); - setHelp(SystemPlugin.HELPPREFIX + "atad0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "atad0000"); } public AddToArchiveDialog(Shell shell, String title, String[] relativePaths) { super(shell, title); - setHelp(SystemPlugin.HELPPREFIX + "atad0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "atad0000"); _relativePaths = relativePaths; ((AddToArchiveForm)form).setRelativePathList(_relativePaths); } @@ -55,7 +55,7 @@ public class AddToArchiveDialog extends CombineDialog { boolean prePopSelection) { super(shell, title, prePopSelection); - setHelp(SystemPlugin.HELPPREFIX + "atad0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "atad0000"); } public AddToArchiveDialog( @@ -65,7 +65,7 @@ public class AddToArchiveDialog extends CombineDialog { String[] relativePaths) { super(shell, title, prePopSelection); - setHelp(SystemPlugin.HELPPREFIX + "atad0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "atad0000"); _relativePaths = relativePaths; ((AddToArchiveForm)form).setRelativePathList(_relativePaths); } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/CombineDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/CombineDialog.java index e420eb7cd51..1b2a9e8cbda 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/CombineDialog.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/CombineDialog.java @@ -15,10 +15,10 @@ ********************************************************************************/ package org.eclipse.rse.files.ui.resources; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.dialogs.SystemSelectRemoteFileOrFolderDialog; import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.widgets.Shell; @@ -37,7 +37,7 @@ public class CombineDialog extends SystemSelectRemoteFileOrFolderDialog { public CombineDialog(Shell shell) { super(shell, false); - setHelp(SystemPlugin.HELPPREFIX + "cmbd0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "cmbd0000"); } /** @@ -48,7 +48,7 @@ public class CombineDialog extends SystemSelectRemoteFileOrFolderDialog { public CombineDialog(Shell shell, String title) { super(shell, title, false); - setHelp(SystemPlugin.HELPPREFIX + "cmbd0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "cmbd0000"); } /** @@ -65,7 +65,7 @@ public class CombineDialog extends SystemSelectRemoteFileOrFolderDialog { super(shell, title, false); prePop = prePopSelection; if (form != null) form.setPrePopSelection(prePop); - setHelp(SystemPlugin.HELPPREFIX + "cmbd0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "cmbd0000"); } /** @@ -84,7 +84,7 @@ public class CombineDialog extends SystemSelectRemoteFileOrFolderDialog { super(shell, title, false); prePop = prePopSelection; if (form != null) form.setPrePopSelection(prePop); - setHelp(SystemPlugin.HELPPREFIX + "cmbd0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "cmbd0000"); } 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 7cabcb8f620..5134c717e46 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,7 +20,6 @@ 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.SystemPlugin; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm; import org.eclipse.rse.filters.ISystemFilter; @@ -35,6 +34,7 @@ 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; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.messages.ISystemMessageLine; import org.eclipse.rse.ui.validators.ValidatorArchiveName; @@ -372,7 +372,7 @@ public class CombineForm extends SystemSelectRemoteFileOrFolderForm setDefaultConnection(connection); setShowNewConnectionPrompt(true); setAutoExpandDepth(0); - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(connection); IRemoteFileSubSystemConfiguration ssf = ss.getParentRemoteFileSubSystemFactory(); RemoteFileFilterString rffs = new RemoteFileFilterString(ssf); @@ -417,7 +417,7 @@ public class CombineForm extends SystemSelectRemoteFileOrFolderForm { preSelectFilter = filter; preSelectFilterChild = folderAbsolutePath; - //SystemPlugin.logInfo("in setRootFolder. Given: " + folderAbsolutePath); + //RSEUIPlugin.logInfo("in setRootFolder. Given: " + folderAbsolutePath); } } @@ -433,7 +433,7 @@ public class CombineForm extends SystemSelectRemoteFileOrFolderForm filters[idx] = filter; preSelectFilter = filter; - //SystemPlugin.logInfo("FILTER 2: " + filter.getFilterString()); + //RSEUIPlugin.logInfo("FILTER 2: " + filter.getFilterString()); } inputProvider.setFilterString(null); // undo what ctor did inputProvider.setQuickFilters(filters); diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ExtractToDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ExtractToDialog.java index ab8c018ecfa..46ebb62f3b3 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ExtractToDialog.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ExtractToDialog.java @@ -15,10 +15,10 @@ ********************************************************************************/ package org.eclipse.rse.files.ui.resources; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.dialogs.SystemSelectRemoteFileOrFolderDialog; import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.widgets.Shell; @@ -38,7 +38,7 @@ public class ExtractToDialog extends SystemSelectRemoteFileOrFolderDialog { public ExtractToDialog(Shell shell) { super(shell, false); - setHelp(SystemPlugin.HELPPREFIX + "exdi0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "exdi0000"); } /** * Constructor when you want to supply your own title. @@ -50,7 +50,7 @@ public class ExtractToDialog extends SystemSelectRemoteFileOrFolderDialog { public ExtractToDialog(Shell shell, String title) { super(shell, title, false); - setHelp(SystemPlugin.HELPPREFIX + "exdi0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "exdi0000"); } protected SystemSelectRemoteFileOrFolderForm getForm(boolean fileMode) 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 53d8d70d884..991ec495e26 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,7 +18,6 @@ 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.SystemPlugin; import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm; import org.eclipse.rse.filters.ISystemFilter; import org.eclipse.rse.filters.SystemFilterSimple; @@ -31,6 +30,7 @@ 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; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.messages.ISystemMessageLine; import org.eclipse.rse.ui.validators.ValidatorFolderName; import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; @@ -76,7 +76,7 @@ public class ExtractToForm extends SystemSelectRemoteFileOrFolderForm // fileNameText = SystemWidgetHelpers.createTextField(composite, null); // fileNameText = SystemWidgetHelpers.createLabeledTextField( -// composite, null, SystemPlugin.getResourceBundle(), ISystemConstants.RESID_EXTRACTTO_NAME_ROOT); +// composite, null, RSEUIPlugin.getResourceBundle(), ISystemConstants.RESID_EXTRACTTO_NAME_ROOT); // fileNameText.addModifyListener(new ModifyListener() { @@ -120,7 +120,7 @@ public class ExtractToForm extends SystemSelectRemoteFileOrFolderForm //System.out.println("...saveasMbr null? "+ (saveasMbr==null)); if (saveasFile != null && saveasFile.exists()) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_UPLOAD_FILE_EXISTS); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UPLOAD_FILE_EXISTS); msg.makeSubstitution(fileName); SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg); ok = dlg.openQuestionNoException(); @@ -258,7 +258,7 @@ public class ExtractToForm extends SystemSelectRemoteFileOrFolderForm setDefaultConnection(connection); setShowNewConnectionPrompt(true); setAutoExpandDepth(0); - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(connection); IRemoteFileSubSystemConfiguration ssf = ss.getParentRemoteFileSubSystemFactory(); RemoteFileFilterString rffs = new RemoteFileFilterString(ssf); @@ -303,7 +303,7 @@ public class ExtractToForm extends SystemSelectRemoteFileOrFolderForm { preSelectFilter = filter; preSelectFilterChild = folderAbsolutePath; - //SystemPlugin.logInfo("in setRootFolder. Given: " + folderAbsolutePath); + //RSEUIPlugin.logInfo("in setRootFolder. Given: " + folderAbsolutePath); } } @@ -319,7 +319,7 @@ public class ExtractToForm extends SystemSelectRemoteFileOrFolderForm filters[idx] = filter; preSelectFilter = filter; - //SystemPlugin.logInfo("FILTER 2: " + filter.getFilterString()); + //RSEUIPlugin.logInfo("FILTER 2: " + filter.getFilterString()); } inputProvider.setFilterString(null); // undo what ctor did inputProvider.setQuickFilters(filters); diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SaveAsForm.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SaveAsForm.java index bdf5259e64f..a1d430fd876 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SaveAsForm.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SaveAsForm.java @@ -18,12 +18,12 @@ package org.eclipse.rse.files.ui.resources; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.rse.core.SystemAdapterHelpers; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFileOrFolderForm; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.messages.ISystemMessageLine; import org.eclipse.rse.ui.messages.SystemMessageDialog; @@ -117,7 +117,7 @@ public class SaveAsForm extends SystemSelectRemoteFileOrFolderForm { //System.out.println("...saveasMbr null? "+ (saveasMbr==null)); if (saveasFile != null && saveasFile.exists()) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_UPLOAD_FILE_EXISTS); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UPLOAD_FILE_EXISTS); msg.makeSubstitution(fileName); SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg); ok = dlg.openQuestionNoException(); 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 e1fff1ca778..3be65cf618c 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,7 +37,6 @@ 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.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.files.ui.actions.SystemDownloadConflictAction; import org.eclipse.rse.model.IHost; @@ -50,6 +49,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem; import org.eclipse.rse.subsystems.files.core.subsystems.IVirtualRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileIOException; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.rse.ui.view.ISystemEditableRemoteObject; import org.eclipse.swt.program.Program; @@ -214,7 +214,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP protected IEditorRegistry getEditorRegistry() { - return SystemPlugin.getDefault().getWorkbench().getEditorRegistry(); + return RSEUIPlugin.getDefault().getWorkbench().getEditorRegistry(); } protected IEditorDescriptor getDefaultTextEditor() @@ -247,7 +247,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP // to handle migration of this smoothly, we can use another method to determine the subsystem if (subsystemId != null) { - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); fs = registry.getSubSystem(subsystemId); } @@ -544,7 +544,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP private boolean doDownload(SystemIFileProperties properties, IProgressMonitor monitor) throws Exception { // file hasn't been downloaded before, so do the download now - /* SystemMessage copyMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COPYTHINGGENERIC_PROGRESS); + /* SystemMessage copyMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYTHINGGENERIC_PROGRESS); copyMessage.makeSubstitution(remoteFile.getName()); monitor.beginTask(copyMessage.getLevelOneText(), (int)remoteFile.getLength()); */ @@ -642,7 +642,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP try { String path = file.getCanonicalPath(); - return SystemPlugin.getWorkspaceRoot().getFileForLocation(new Path(path)); + return RSEUIPlugin.getWorkspaceRoot().getFileForLocation(new Path(path)); } catch (IOException e) { @@ -924,7 +924,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP } } - IWorkbenchWindow[] windows = SystemPlugin.getDefault().getWorkbench().getWorkbenchWindows(); + IWorkbenchWindow[] windows = RSEUIPlugin.getDefault().getWorkbench().getWorkbenchWindows(); for (int i = 0; i < windows.length; i++) { @@ -997,7 +997,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP if (!remoteFile.exists()) { - SystemMessage message = SystemPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND); + SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND); message.makeSubstitution(remotePath, subsystem.getHost().getHostName()); SystemMessageDialog dialog = new SystemMessageDialog(shell, message); dialog.open(); @@ -1033,7 +1033,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP download(shell); } - SystemMessage message = SystemPlugin.getPluginMessage(ISystemMessages.MSG_DOWNLOAD_NO_WRITE); + SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DOWNLOAD_NO_WRITE); message.makeSubstitution(remotePath, subsystem.getHost().getHostName()); SystemMessageDialog dialog = new SystemMessageDialog(shell, message); @@ -1057,7 +1057,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP } else if (result == OPEN_IN_DIFFERENT_PERSPECTIVE) { - SystemMessage message = SystemPlugin.getPluginMessage(ISystemMessages.MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR); + SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR); message.makeSubstitution(remotePath, subsystem.getHost().getHostName()); SystemMessageDialog dialog = new SystemMessageDialog(shell, message); @@ -1194,7 +1194,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP properties.setRemoteFileObject(this); // set remote properties - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); String subSystemId = registry.getAbsoluteNameForSubSystem(subsystem); properties.setRemoteFileSubSystem(subSystemId); properties.setRemoteFilePath(remoteFile.getAbsolutePath()); @@ -1218,7 +1218,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP encoding = util.getXMLFileEncoding(tempPath); } catch (IOException e) { - IStatus s = new Status(IStatus.ERROR, SystemPlugin.PLUGIN_ID, IStatus.ERROR, e.getLocalizedMessage(), e); + IStatus s = new Status(IStatus.ERROR, RSEUIPlugin.PLUGIN_ID, IStatus.ERROR, e.getLocalizedMessage(), e); throw new CoreException(s); } } @@ -1416,9 +1416,9 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP delta.accept(this); } catch (CoreException e) { - SystemPlugin.logError("Error accepting delta", e); + RSEUIPlugin.logError("Error accepting delta", e); RemoteFileIOException exc = new RemoteFileIOException(e); - SystemMessageDialog dialog = new SystemMessageDialog(SystemPlugin.getActiveWorkbenchShell(), exc.getSystemMessage()); + SystemMessageDialog dialog = new SystemMessageDialog(RSEUIPlugin.getActiveWorkbenchShell(), exc.getSystemMessage()); dialog.open(); } } @@ -1537,7 +1537,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP catch (InvocationTargetException e) { SystemBasePlugin.logError("Error in performSaveAs", e); - SystemMessage message = SystemPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED); + SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED); SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message); dialog.open(); return true; @@ -1564,7 +1564,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP catch (Exception e) { SystemBasePlugin.logError("Error in performSaveAs", e); - SystemMessage message = SystemPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED); + SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED); SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message); dialog.open(); return true; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemIFileProperties.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemIFileProperties.java index e7e44e4ce0d..12fa933a61f 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemIFileProperties.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemIFileProperties.java @@ -19,7 +19,7 @@ package org.eclipse.rse.files.ui.resources; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.QualifiedName; -import org.eclipse.rse.core.SystemPlugin; +import org.eclipse.rse.ui.RSEUIPlugin; @@ -55,7 +55,7 @@ public class SystemIFileProperties implements ISystemTextEditorConstants, ISyste // local encoding qualified name // NOTE: DO NOT CHANGE THIS!! This exact qualified name is used by the IBM debugger. - private static QualifiedName _nameLocalEncoding = new QualifiedName(SystemPlugin.getDefault().getSymbolicName(), LOCAL_ENCODING_KEY); + private static QualifiedName _nameLocalEncoding = new QualifiedName(RSEUIPlugin.getDefault().getSymbolicName(), LOCAL_ENCODING_KEY); protected IResource _resource = null; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteEditManager.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteEditManager.java index ba13f620104..c443cf6182c 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteEditManager.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteEditManager.java @@ -35,9 +35,9 @@ import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Platform; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.ui.ISystemPreferencesConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.view.ISystemEditableRemoteObject; import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; import org.eclipse.swt.widgets.Display; @@ -62,7 +62,7 @@ public class SystemRemoteEditManager public static final String REMOTE_EDIT_PROJECT_BUILDER_ID = "org.eclipse.rse.ui.remoteSystemsTempBuilder"; private static SystemRemoteEditManager inst; - private SystemPlugin plugin; + private RSEUIPlugin plugin; private List _mountPathMappers; /** @@ -71,7 +71,7 @@ public class SystemRemoteEditManager private SystemRemoteEditManager() { super(); - plugin = SystemPlugin.getDefault(); + plugin = RSEUIPlugin.getDefault(); registerMountPathMappers(); } @@ -539,7 +539,7 @@ public class SystemRemoteEditManager String pathStr = properties.getRemoteFilePath(); if (subsystemStr != null && pathStr != null) { - ISubSystem subsystem = SystemPlugin.getTheSystemRegistry().getSubSystem(subsystemStr); + ISubSystem subsystem = RSEUIPlugin.getTheSystemRegistry().getSubSystem(subsystemStr); if (subsystem != null) { Object rmtObject = null; @@ -659,7 +659,7 @@ public class SystemRemoteEditManager protected void cleanupCache() { - IPreferenceStore store = SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore(); boolean enableMaxSize = store.getBoolean(ISystemPreferencesConstants.LIMIT_CACHE); if (enableMaxSize) { diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerTypeDefinitionCache.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerTypeDefinitionCache.java index 55df65abac1..ded3a466cf9 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerTypeDefinitionCache.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemRemoteMarkerTypeDefinitionCache.java @@ -26,7 +26,7 @@ import java.util.Set; import org.eclipse.core.runtime.IExtension; import org.eclipse.core.runtime.IExtensionPoint; import org.eclipse.core.runtime.Platform; -import org.eclipse.rse.core.SystemPlugin; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -66,7 +66,7 @@ public class SystemRemoteMarkerTypeDefinitionCache { * Load marker type definitions. */ private void loadDefinitions() { - IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(SystemPlugin.PLUGIN_ID, ISystemRemoteMarker.EXTENSION_POINT_ID); + IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(RSEUIPlugin.PLUGIN_ID, ISystemRemoteMarker.EXTENSION_POINT_ID); IExtension[] types = point.getExtensions(); definitions = new HashMap(types.length); 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 ac599e5e000..cef017a6784 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,7 +32,6 @@ 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.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.filters.ISystemFilterReference; @@ -46,6 +45,7 @@ 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.RemoteFileSubSystem; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.progress.WorkbenchJob; @@ -133,7 +133,7 @@ public abstract class SystemTempFileListener implements IResourceChangeListener } else { - if (!SystemPlugin.getThePersistenceManager().isExporting()) + if (!RSEUIPlugin.getThePersistenceManager().isExporting()) { List changes = new ArrayList(); checkLocalChanges(delta, changes); @@ -155,7 +155,7 @@ public abstract class SystemTempFileListener implements IResourceChangeListener public IStatus run(IProgressMonitor monitor) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_SYNCHRONIZE_PROGRESS); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_SYNCHRONIZE_PROGRESS); monitor.beginTask(msg.getLevelOneText(), _resources.size()); for (int i = 0; i < _resources.size(); i++) { @@ -180,7 +180,7 @@ public abstract class SystemTempFileListener implements IResourceChangeListener _isSynching = true; synchronized (_changedResources) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_SYNCHRONIZE_PROGRESS); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_SYNCHRONIZE_PROGRESS); monitor.beginTask(msg.getLevelOneText(), IProgressMonitor.UNKNOWN); setName(msg.getLevelOneText()); for (int i = 0; i < _changedResources.size(); i++) @@ -300,7 +300,7 @@ public abstract class SystemTempFileListener implements IResourceChangeListener protected IRunnableContext getRunnableContext(Shell shell) { - IRunnableContext irc = SystemPlugin.getTheSystemRegistry().getRunnableContext(); + IRunnableContext irc = RSEUIPlugin.getTheSystemRegistry().getRunnableContext(); if (irc != null) { return irc; @@ -365,7 +365,7 @@ public abstract class SystemTempFileListener implements IResourceChangeListener String ssStr = properties.getRemoteFileSubSystem(); if (ssStr != null) { - ISubSystem ss = SystemPlugin.getTheSystemRegistry().getSubSystem(ssStr); + ISubSystem ss = RSEUIPlugin.getTheSystemRegistry().getSubSystem(ssStr); if (doesHandle(ss)) { _changedResources.add(resource); @@ -385,7 +385,7 @@ public abstract class SystemTempFileListener implements IResourceChangeListener */ ///* // check if this file is being edited - /*IWorkbenchWindow window = SystemPlugin.getActiveWorkbenchWindow(); + /*IWorkbenchWindow window = RSEUIPlugin.getActiveWorkbenchWindow(); if (window == null) { // DKM: @@ -499,7 +499,7 @@ public abstract class SystemTempFileListener implements IResourceChangeListener // to handle migration of this smoothly, we can use another method to determine the subsystem if (subsystemId != null) { - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); fs = registry.getSubSystem(subsystemId); } @@ -581,7 +581,7 @@ public abstract class SystemTempFileListener implements IResourceChangeListener protected void refreshRemoteResource(Object parent) { - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); // refresh if (parent != null) { @@ -619,7 +619,7 @@ public abstract class SystemTempFileListener implements IResourceChangeListener private IRemoteFileSubSystem getLocalFileSubSystem() { - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); IHost con = registry.getLocalHost(); if (con != 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 b7f9252b2dd..f8e59af664e 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 @@ -20,7 +20,6 @@ import java.util.ArrayList; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.files.ui.actions.SystemUploadConflictAction; import org.eclipse.rse.model.ISystemRegistry; @@ -30,6 +29,7 @@ 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.RemoteFileIOException; import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSecurityException; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.actions.DisplaySystemMessageAction; import org.eclipse.rse.ui.view.ISystemEditableRemoteObject; import org.eclipse.swt.widgets.Display; @@ -115,7 +115,7 @@ public class SystemUniversalTempFileListener extends SystemTempFileListener { if (subsystem instanceof IRemoteFileSubSystem) { - Shell shell = SystemPlugin.getTheSystemRegistry().getShell(); + Shell shell = RSEUIPlugin.getTheSystemRegistry().getShell(); IRemoteFileSubSystem fs = (IRemoteFileSubSystem) subsystem; // first we need to get the stored timestamp property and the actual remote timestamp @@ -254,7 +254,7 @@ public class SystemUniversalTempFileListener extends SystemTempFileListener IRemoteFile parent = remoteFile.getParentRemoteFile(); - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); // refresh if (parent != null) { @@ -300,7 +300,7 @@ public class SystemUniversalTempFileListener extends SystemTempFileListener // 2) Overwrite remote // 3) Save as... // 4) Cancel - Shell shell = SystemPlugin.getTheSystemRegistry().getShell(); + Shell shell = RSEUIPlugin.getTheSystemRegistry().getShell(); SystemUploadConflictAction conflictAction = new SystemUploadConflictAction(shell, tempFile, remoteFile, remoteNewer); conflictAction.run(); 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 31f321a839f..758b534ff10 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 @@ -30,7 +30,6 @@ 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.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.model.IHost; @@ -55,6 +54,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFolderNotEmptyExce import org.eclipse.rse.subsystems.files.core.util.ValidatorFileUniqueName; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.ISystemPreferencesConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.dialogs.SystemRenameSingleDialog; import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.swt.widgets.Display; @@ -124,7 +124,7 @@ public class UniversalFileTransferUtility /* if (monitor != null) { - SystemMessage copyMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COPYTHINGGENERIC_PROGRESS); + SystemMessage copyMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYTHINGGENERIC_PROGRESS); copyMessage.makeSubstitution(srcFileOrFolder.getName()); monitor.beginTask(copyMessage.getLevelOneText(), IProgressMonitor.UNKNOWN); @@ -188,7 +188,7 @@ public class UniversalFileTransferUtility String remotePath = remoteFile.getAbsolutePath(); - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); String subSystemId = registry.getAbsoluteNameForSubSystem(subSystem); properties.setRemoteFileSubSystem(subSystemId); properties.setRemoteFilePath(remotePath); @@ -226,7 +226,7 @@ public class UniversalFileTransferUtility return null; } - boolean doSuperTransferProperty = SystemPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER); + boolean doSuperTransferProperty = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER); List set = remoteSet.getResourceSet(); @@ -241,7 +241,7 @@ public class UniversalFileTransferUtility IRemoteFile srcFileOrFolder = (IRemoteFile)set.get(i); if (!srcFileOrFolder.exists()) { - SystemMessage errorMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND); + SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND); errorMessage.makeSubstitution(srcFileOrFolder.getAbsolutePath(), srcFS.getHostAliasName()); resultSet.setMessage(errorMessage); } @@ -355,7 +355,7 @@ public class UniversalFileTransferUtility } if (!srcFileOrFolder.exists()) { - SystemMessage errorMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND); + SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND); errorMessage.makeSubstitution(srcFileOrFolder.getAbsolutePath(), srcFS.getHostAliasName()); return errorMessage; } @@ -389,7 +389,7 @@ public class UniversalFileTransferUtility { IResource tempFolder = null; - boolean doSuperTransferProperty = SystemPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER); + boolean doSuperTransferProperty = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER); if (doCompressedTransfer && doSuperTransferProperty && !srcFileOrFolder.isRoot() && !(srcFileOrFolder.getParentRemoteFileSubSystem().getHost().getSystemType().equals("Local"))) @@ -480,7 +480,7 @@ public class UniversalFileTransferUtility */ private static IRemoteFileSubSystem getLocalFileSubSystem() { - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); IHost[] connections = registry.getHosts(); for (int i = 0; i < connections.length; i++) { @@ -522,7 +522,7 @@ public class UniversalFileTransferUtility */ public static SystemRemoteResourceSet copyWorkspaceResourcesToRemote(SystemWorkspaceResourceSet workspaceSet, IRemoteFile targetFolder, IProgressMonitor monitor, Shell shell, boolean checkForCollisions) { - boolean doSuperTransferPreference = SystemPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER) + boolean doSuperTransferPreference = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER) && targetFolder.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemFactory().supportsArchiveManagement(); IRemoteFileSubSystem targetFS = targetFolder.getParentRemoteFileSubSystem(); @@ -541,7 +541,7 @@ public class UniversalFileTransferUtility if (!targetFolder.canWrite()) { - SystemMessage errorMsg = SystemPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR); + SystemMessage errorMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR); errorMsg.makeSubstitution(targetFS.getHostAliasName()); resultSet.setMessage(errorMsg); return resultSet; @@ -759,7 +759,7 @@ public class UniversalFileTransferUtility if (!targetFolder.canWrite()) { - SystemMessage errorMsg = SystemPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR); + SystemMessage errorMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR); errorMsg.makeSubstitution(targetFS.getHostAliasName()); return errorMsg; } @@ -770,7 +770,7 @@ public class UniversalFileTransferUtility } /* - SystemMessage copyMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COPY_PROGRESS); + SystemMessage copyMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPY_PROGRESS); copyMessage.makeSubstitution(srcFileOrFolder.getName(), targetFolder.getAbsolutePath()); */ @@ -884,7 +884,7 @@ public class UniversalFileTransferUtility boolean isTargetLocal = newTargetFolder.getParentRemoteFileSubSystem().getHost().getSystemType().equals("Local"); boolean destInArchive = (newTargetFolder instanceof IVirtualRemoteFile) || newTargetFolder.isArchive(); - boolean doSuperTransferPreference = SystemPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER); + boolean doSuperTransferPreference = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER); if (doCompressedTransfer && doSuperTransferPreference && !destInArchive && !isTargetLocal) { @@ -1045,7 +1045,7 @@ public class UniversalFileTransferUtility protected static String getArchiveExtensionFromProperties() { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); String archiveType = store.getString(ISystemPreferencesConstants.SUPERTRANSFER_ARC_TYPE); if (archiveType == null || !ArchiveHandlerManager.getInstance().isRegisteredArchive("test." + archiveType)) { @@ -1186,7 +1186,7 @@ public class UniversalFileTransferUtility if (shouldExtract) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_EXTRACT_PROGRESS); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXTRACT_PROGRESS); msg.makeSubstitution(currentSource.getName()); monitor.subTask(msg.getLevelOneText()); @@ -1481,9 +1481,9 @@ public class UniversalFileTransferUtility IRemoteFileSubSystem ss = targetFolder.getParentRemoteFileSubSystem(); IRemoteFile targetFileOrFolder = ss.getRemoteFileObject(targetFolder, oldName); - //SystemPlugin.logInfo("CHECKING FOR COLLISION ON '"+srcFileOrFolder.getAbsolutePath() + "' IN '" +targetFolder.getAbsolutePath()+"'"); - //SystemPlugin.logInfo("...TARGET FILE: '"+tgtFileOrFolder.getAbsolutePath()+"'"); - //SystemPlugin.logInfo("...target.exists()? "+tgtFileOrFolder.exists()); + //RSEUIPlugin.logInfo("CHECKING FOR COLLISION ON '"+srcFileOrFolder.getAbsolutePath() + "' IN '" +targetFolder.getAbsolutePath()+"'"); + //RSEUIPlugin.logInfo("...TARGET FILE: '"+tgtFileOrFolder.getAbsolutePath()+"'"); + //RSEUIPlugin.logInfo("...target.exists()? "+tgtFileOrFolder.exists()); if (targetFileOrFolder.exists()) { //monitor.setVisible(false); wish we could! 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 c8093f5a9ab..98e95204d01 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,7 +29,6 @@ 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.SystemPlugin; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.actions.SystemSelectRemoteFolderAction; import org.eclipse.rse.model.IHost; @@ -48,6 +47,7 @@ import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSyst 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.SystemWidgetHelpers; import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.rse.ui.view.search.SystemSearchUI; @@ -604,7 +604,7 @@ public class SystemSearchPage extends DialogPage implements ISearchPage { if (searchString != null && searchString.length() != 0) { if (!util.isValidRegex(searchString)) { - SystemMessage message = SystemPlugin.getPluginMessage(ISystemMessages.MSG_REMOTE_SEARCH_INVALID_REGEX); + SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_REMOTE_SEARCH_INVALID_REGEX); message.makeSubstitution(searchString); SystemMessageDialog.displayErrorMessage(getShell(), message); stringCombo.setFocus(); @@ -621,7 +621,7 @@ public class SystemSearchPage extends DialogPage implements ISearchPage { if (fileNameString != null && fileNameString.length() != 0) { if (!util.isValidRegex(fileNameString)) { - SystemMessage message = SystemPlugin.getPluginMessage(ISystemMessages.MSG_REMOTE_SEARCH_INVALID_REGEX); + SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_REMOTE_SEARCH_INVALID_REGEX); message.makeSubstitution(fileNameString); SystemMessageDialog.displayErrorMessage(getShell(), message); fileNameCombo.setFocus(); @@ -975,7 +975,7 @@ public class SystemSearchPage extends DialogPage implements ISearchPage { setControl(main); // set help - SystemWidgetHelpers.setHelp(main, SystemPlugin.HELPPREFIX + "rsdi0000"); + SystemWidgetHelpers.setHelp(main, RSEUIPlugin.HELPPREFIX + "rsdi0000"); } /** @@ -1103,7 +1103,7 @@ public class SystemSearchPage extends DialogPage implements ISearchPage { return null; } else { - ISystemRegistry reg = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry reg = RSEUIPlugin.getTheSystemRegistry(); ISystemProfile profile = reg.getSystemProfile(profName); if (profile == null) { @@ -1330,7 +1330,7 @@ public class SystemSearchPage extends DialogPage implements ISearchPage { * @return the dialog settings of the plugin. */ private IDialogSettings getPluginDialogSettings() { - return SystemPlugin.getDefault().getDialogSettings(); + return RSEUIPlugin.getDefault().getDialogSettings(); } /** diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/RemoteFileSubSystemFactoryAdapter.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/RemoteFileSubSystemFactoryAdapter.java index 668cf7d4268..d431caf56e3 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/RemoteFileSubSystemFactoryAdapter.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/RemoteFileSubSystemFactoryAdapter.java @@ -25,7 +25,6 @@ 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.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.files.ui.actions.SystemFileUpdateFilterAction; import org.eclipse.rse.files.ui.actions.SystemNewFileAction; @@ -38,6 +37,7 @@ 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.SubsystemFactoryAdapter; import org.eclipse.rse.ui.wizards.ISystemNewConnectionWizardPage; @@ -135,7 +135,7 @@ public class RemoteFileSubSystemFactoryAdapter extends SubsystemFactoryAdapter // FIXME - can't do this here anymore //_additionalActions.add(new SystemCommandAction(shell, true)); - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); Clipboard clipboard = registry.getSystemClipboard(); _additionalActions.add(new SystemPasteFromClipboardAction(shell, clipboard)); } 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 489eb8e60c4..d3974d89ef2 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,6 @@ 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.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType; import org.eclipse.rse.core.subsystems.SubSystem; @@ -104,6 +103,7 @@ import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.ISystemPreferencesConstants; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemCopyToClipboardAction; import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction; @@ -194,8 +194,8 @@ public class SystemViewRemoteFileAdapter private static PropertyDescriptor[] archiveDescriptorArray = null; private static PropertyDescriptor[] virtualDescriptorArray = null; - static final SystemMessage _uploadMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_UPLOADING_PROGRESS); - static final SystemMessage _downloadMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_DOWNLOADING_PROGRESS); + static final SystemMessage _uploadMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UPLOADING_PROGRESS); + static final SystemMessage _downloadMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DOWNLOADING_PROGRESS); /** * Constructor @@ -207,7 +207,7 @@ public class SystemViewRemoteFileAdapter xlatedCompressedSize = SystemViewResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSEDSIZE_VALUE; xlatedExpandedSize = SystemViewResources.RESID_PROPERTY_ARCHIVE_EXPANDEDSIZE_VALUE; - IWorkbench workbench = SystemPlugin.getDefault().getWorkbench(); + IWorkbench workbench = RSEUIPlugin.getDefault().getWorkbench(); if (workbench != null) registry = workbench.getEditorRegistry(); } @@ -403,7 +403,7 @@ public class SystemViewRemoteFileAdapter ISubSystem subsys = firstFile.getParentRemoteFileSubSystem(); // DKM - clipboard based copy actions - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); Clipboard clipboard = registry.getSystemClipboard(); if (pasteClipboardAction == null) @@ -515,11 +515,11 @@ public class SystemViewRemoteFileAdapter isOpen = atv.getExpandedState(element); } if (file.isRoot()) - return SystemPlugin.getDefault().getImageDescriptor(isOpen ? ISystemIconConstants.ICON_SYSTEM_ROOTDRIVEOPEN_ID : ISystemIconConstants.ICON_SYSTEM_ROOTDRIVE_ID); + return RSEUIPlugin.getDefault().getImageDescriptor(isOpen ? ISystemIconConstants.ICON_SYSTEM_ROOTDRIVEOPEN_ID : ISystemIconConstants.ICON_SYSTEM_ROOTDRIVE_ID); else if (isOpen) return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER); else - return SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FOLDER_ID); + return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FOLDER_ID); } } @@ -716,7 +716,7 @@ public class SystemViewRemoteFileAdapter if ((children == null) || (children.length == 0)) { //children = new SystemMessageObject[1]; - //children[0] = new SystemMessageObject(SystemPlugin.getPluginMessage(MSG_EXPAND_EMPTY), + //children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_EXPAND_EMPTY), // ISystemMessageObject.MSGTYPE_EMPTY, element); children = EMPTY_LIST; } @@ -725,13 +725,13 @@ public class SystemViewRemoteFileAdapter catch (InterruptedException exc) { children = new SystemMessageObject[1]; - children[0] = new SystemMessageObject(SystemPlugin.getPluginMessage(MSG_EXPAND_CANCELLED), ISystemMessageObject.MSGTYPE_CANCEL, element); + children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_EXPAND_CANCELLED), ISystemMessageObject.MSGTYPE_CANCEL, element); //System.out.println("Canceled."); } catch (Exception exc) { children = new SystemMessageObject[1]; - children[0] = new SystemMessageObject(SystemPlugin.getPluginMessage(MSG_EXPAND_FAILED), ISystemMessageObject.MSGTYPE_ERROR, element); + children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_EXPAND_FAILED), ISystemMessageObject.MSGTYPE_ERROR, element); SystemBasePlugin.logError("Exception resolving file filter strings", exc); } // message already issued } @@ -814,7 +814,7 @@ public class SystemViewRemoteFileAdapter int i = -1; // add our unique property descriptors... - SystemPlugin plugin = SystemPlugin.getDefault(); + RSEUIPlugin plugin = RSEUIPlugin.getDefault(); // classification if (isRegular) uniquePropertyDescriptorArray[++i] = createSimplePropertyDescriptor(P_FILE_CLASSIFICATION, SystemViewResources.RESID_PROPERTY_FILE_CLASSIFICATION_LABEL, SystemViewResources.RESID_PROPERTY_FILE_CLASSIFICATION_TOOLTIP); @@ -1370,7 +1370,7 @@ public class SystemViewRemoteFileAdapter { boolean supportsSearch = ((IRemoteFileSubSystemConfiguration)set.getSubSystem().getSubSystemConfiguration()).supportsSearch(); - boolean doSuperTransferProperty = SystemPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER); + boolean doSuperTransferProperty = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER); if (!doSuperTransferProperty && supportsSearch) { SystemRemoteResourceSet flatSet = new SystemRemoteResourceSet(set.getSubSystem(), set.getAdapter()); @@ -1419,7 +1419,7 @@ public class SystemViewRemoteFileAdapter */ private IRemoteFileSubSystem getLocalFileSubSystem() { - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); IHost[] connections = registry.getHosts(); for (int i = 0; i < connections.length; i++) { @@ -1632,7 +1632,7 @@ public class SystemViewRemoteFileAdapter if (!targetFolder.canWrite()) { - SystemMessage errorMsg = SystemPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR); + SystemMessage errorMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR); errorMsg.makeSubstitution(targetFS.getHostAliasName()); resultSet.setMessage(errorMsg); return resultSet; @@ -1649,7 +1649,7 @@ public class SystemViewRemoteFileAdapter if (fromSet instanceof SystemWorkspaceResourceSet) { - boolean doSuperTransferProperty = SystemPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER); + boolean doSuperTransferProperty = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.DOSUPERTRANSFER); if (!doSuperTransferProperty) { SystemWorkspaceResourceSet flatFromSet = new SystemWorkspaceResourceSet(); @@ -1734,14 +1734,14 @@ public class SystemViewRemoteFileAdapter IRemoteFile srcFileOrFolder = (IRemoteFile)set.get(i); if (!srcFileOrFolder.exists()) { - SystemMessage errorMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND); + SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND); errorMessage.makeSubstitution(srcFileOrFolder.getAbsolutePath(), srcFileOrFolder.getSystemConnection().getAliasName()); resultSet.setMessage(errorMessage); return resultSet; } if (!srcFileOrFolder.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemFactory().supportsArchiveManagement()) { - SystemMessage errorMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_ARCHIVEMANAGEMENT_NOTSUPPORTED); + SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_ARCHIVEMANAGEMENT_NOTSUPPORTED); resultSet.setMessage(errorMessage); return resultSet; } @@ -1798,7 +1798,7 @@ public class SystemViewRemoteFileAdapter String name = (String)toCopyNames.get(x); /* - SystemMessage copyMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COPY_PROGRESS); + SystemMessage copyMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPY_PROGRESS); copyMessage.makeSubstitution(srcFileOrFolder.getName(), targetFolder.getName()); if (monitor != null) { @@ -1888,7 +1888,7 @@ public class SystemViewRemoteFileAdapter if (!targetFolder.canWrite()) { - SystemMessage errorMsg = SystemPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR); + SystemMessage errorMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR); errorMsg.makeSubstitution(targetFS.getHostAliasName()); return errorMsg; } @@ -1988,12 +1988,12 @@ public class SystemViewRemoteFileAdapter IRemoteFile srcFileOrFolder = (IRemoteFile) src; if (!srcFileOrFolder.exists()) { - SystemMessage errorMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND); + SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND); errorMessage.makeSubstitution(srcFileOrFolder.getAbsolutePath(), srcFileOrFolder.getSystemConnection().getAliasName()); return errorMessage; } - SystemMessage copyMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COPY_PROGRESS); + SystemMessage copyMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPY_PROGRESS); copyMessage.makeSubstitution(srcFileOrFolder.getName(), targetFolder.getAbsolutePath()); IRemoteFileSubSystem localFS = srcFileOrFolder.getParentRemoteFileSubSystem(); @@ -2151,9 +2151,9 @@ public class SystemViewRemoteFileAdapter IRemoteFileSubSystem ss = targetFolder.getParentRemoteFileSubSystem(); IRemoteFile targetFileOrFolder = ss.getRemoteFileObject(targetFolder, oldName); - //SystemPlugin.logInfo("CHECKING FOR COLLISION ON '"+srcFileOrFolder.getAbsolutePath() + "' IN '" +targetFolder.getAbsolutePath()+"'"); - //SystemPlugin.logInfo("...TARGET FILE: '"+tgtFileOrFolder.getAbsolutePath()+"'"); - //SystemPlugin.logInfo("...target.exists()? "+tgtFileOrFolder.exists()); + //RSEUIPlugin.logInfo("CHECKING FOR COLLISION ON '"+srcFileOrFolder.getAbsolutePath() + "' IN '" +targetFolder.getAbsolutePath()+"'"); + //RSEUIPlugin.logInfo("...TARGET FILE: '"+tgtFileOrFolder.getAbsolutePath()+"'"); + //RSEUIPlugin.logInfo("...target.exists()? "+tgtFileOrFolder.exists()); if (targetFileOrFolder.exists()) { //monitor.setVisible(false); wish we could! @@ -2258,7 +2258,7 @@ public class SystemViewRemoteFileAdapter catch (Exception exc) { ok = false; - SystemMessageDialog.displayErrorMessage(shell, SystemPlugin.getPluginMessage(ISystemMessages.FILEMSG_DELETE_FILE_FAILED).makeSubstitution(file.toString())); + SystemMessageDialog.displayErrorMessage(shell, RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_DELETE_FILE_FAILED).makeSubstitution(file.toString())); } return ok; } @@ -2297,7 +2297,7 @@ public class SystemViewRemoteFileAdapter catch (Exception exc) { ok = false; - SystemMessageDialog.displayErrorMessage(shell, SystemPlugin.getPluginMessage(ISystemMessages.FILEMSG_DELETE_FILE_FAILED).makeSubstitution(file.toString())); + SystemMessageDialog.displayErrorMessage(shell, RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_DELETE_FILE_FAILED).makeSubstitution(file.toString())); } } ok = ss.deleteBatch(files, monitor); @@ -2382,7 +2382,7 @@ public class SystemViewRemoteFileAdapter boolean ok = true; IRemoteFile file = (IRemoteFile) element; IRemoteFileSubSystem ss = file.getParentRemoteFileSubSystem(); - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); try { @@ -2415,7 +2415,7 @@ public class SystemViewRemoteFileAdapter catch (Exception exc) { ok = false; - SystemMessageDialog.displayErrorMessage(shell, SystemPlugin.getPluginMessage(ISystemMessages.FILEMSG_RENAME_FILE_FAILED).makeSubstitution(file.toString())); + SystemMessageDialog.displayErrorMessage(shell, RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_RENAME_FILE_FAILED).makeSubstitution(file.toString())); } return ok; } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewRemoteSearchResultAdapter.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewRemoteSearchResultAdapter.java index 6de60fec05f..99dd4041b47 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewRemoteSearchResultAdapter.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewRemoteSearchResultAdapter.java @@ -25,7 +25,6 @@ import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.rse.core.SystemAdapterHelpers; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.files.ui.actions.SystemRemoteFileSearchOpenWithMenu; @@ -37,6 +36,7 @@ import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.actions.SystemCopyToClipboardAction; import org.eclipse.rse.ui.view.AbstractSystemViewAdapter; import org.eclipse.rse.ui.view.ISystemDragDropAdapter; @@ -107,7 +107,7 @@ public class SystemViewRemoteSearchResultAdapter extends AbstractSystemViewAdapt { if (_copyOutputAction == null) { - _copyOutputAction = new SystemCopyToClipboardAction(shell, SystemPlugin.getTheSystemRegistry().getSystemClipboard()); + _copyOutputAction = new SystemCopyToClipboardAction(shell, RSEUIPlugin.getTheSystemRegistry().getSystemClipboard()); } menu.add(menuGroup, _copyOutputAction); @@ -460,13 +460,13 @@ public class SystemViewRemoteSearchResultAdapter extends AbstractSystemViewAdapt if (element instanceof IHostSearchResult) { ImageDescriptor imageDescriptor = null; - imageDescriptor = SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SEARCH_RESULT_ID); + imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SEARCH_RESULT_ID); return imageDescriptor; } else { // return some default - ImageDescriptor imageDescriptor = SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_BLANK_ID); + ImageDescriptor imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_BLANK_ID); return imageDescriptor; } } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewRemoteSearchResultSetAdapter.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewRemoteSearchResultSetAdapter.java index 2eac1ba71c0..a294eb50cd0 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewRemoteSearchResultSetAdapter.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/view/SystemViewRemoteSearchResultSetAdapter.java @@ -20,7 +20,6 @@ import java.util.List; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.search.IHostSearchResultSet; @@ -30,6 +29,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.RemoteSearchResultsConte import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.view.AbstractSystemViewAdapter; import org.eclipse.rse.ui.view.ISystemEditableRemoteObject; import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; @@ -77,7 +77,7 @@ public class SystemViewRemoteSearchResultSetAdapter extends AbstractSystemViewAd */ public ImageDescriptor getImageDescriptor(Object element) { - ImageDescriptor imageDescriptor= SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SEARCH_RESULT_ID); + ImageDescriptor imageDescriptor= RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SEARCH_RESULT_ID); return imageDescriptor; } @@ -102,16 +102,16 @@ public class SystemViewRemoteSearchResultSetAdapter extends AbstractSystemViewAd SystemMessage msg = null; if (set.isRunning()) { - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_RUNNING); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_RUNNING); } else if (set.isFinished()) { - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_FINISHED); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_FINISHED); } else if (set.isCancelled()) { - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_OPERTION_STOPPED); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERTION_STOPPED); } else if (set.isDisconnected()) { - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_DISCONNECTED); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_DISCONNECTED); } msg.makeSubstitution(name); diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemEnterOrSelectRemoteFileForm.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemEnterOrSelectRemoteFileForm.java index c3c555485e1..a8a27313b87 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemEnterOrSelectRemoteFileForm.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemEnterOrSelectRemoteFileForm.java @@ -18,11 +18,11 @@ package org.eclipse.rse.files.ui.widgets; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.rse.core.SystemAdapterHelpers; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.messages.ISystemMessageLine; import org.eclipse.rse.ui.messages.SystemMessageDialog; @@ -109,7 +109,7 @@ public class SystemEnterOrSelectRemoteFileForm extends SystemSelectRemoteFileOrF if (saveasFile != null && saveasFile.exists()) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_UPLOAD_FILE_EXISTS); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UPLOAD_FILE_EXISTS); msg.makeSubstitution(fileName); SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg); ok = dlg.openQuestionNoException(); 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 cccc0dbc5be..64a2d77f52d 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 @@ -18,7 +18,6 @@ package org.eclipse.rse.files.ui.widgets; import java.util.Hashtable; import java.util.ResourceBundle; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemPreferencesManager; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.files.ui.actions.SystemSelectRemoteFolderAction; @@ -32,6 +31,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.ISystemPreferencesConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.widgets.ISystemCombo; import org.eclipse.rse.ui.widgets.SystemHistoryCombo; @@ -133,7 +133,7 @@ public class SystemQualifiedRemoteFolderCombo extends Composite * connections they can create. * @param systemTypes An array of system type names * - * @see org.eclipse.rse.core.ISystemTypes + * @see org.eclipse.rse.core.IRSESystemType */ public void setSystemTypes(String[] systemTypes) { @@ -145,7 +145,7 @@ public class SystemQualifiedRemoteFolderCombo extends Composite * * @param systemType The name of the system type to restrict to * - * @see org.eclipse.rse.core.ISystemTypes + * @see org.eclipse.rse.core.IRSESystemType */ public void setSystemType(String systemType) { @@ -412,11 +412,11 @@ public class SystemQualifiedRemoteFolderCombo extends Composite String connName = extractConnectionName(fileString); if ((profileName == null) || (connName == null)) return null; - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); ISystemProfile profile = sr.getSystemProfile(profileName); if (profile == null) return null; - IHost conn = SystemPlugin.getTheSystemRegistry().getHost(profile,connName); + IHost conn = RSEUIPlugin.getTheSystemRegistry().getHost(profile,connName); return conn; } @@ -564,22 +564,22 @@ public class SystemQualifiedRemoteFolderCombo extends Composite if ((profileName == null) || (connName == null) || (dirName == null)) return null; - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); // turn profile name into profile object... ISystemProfile profile = sr.getSystemProfile(profileName); if (profile == null) { - msg = SystemPlugin.getPluginMessage(MSG_ERROR_PROFILE_NOTFOUND); + msg = RSEUIPlugin.getPluginMessage(MSG_ERROR_PROFILE_NOTFOUND); msg.makeSubstitution(profileName); throw new Exception(msg.getLevelOneText()); } // turn connection name into connection object... - IHost conn = SystemPlugin.getTheSystemRegistry().getHost(profile,connName); + IHost conn = RSEUIPlugin.getTheSystemRegistry().getHost(profile,connName); if (conn == null) { - msg = SystemPlugin.getPluginMessage(MSG_ERROR_CONNECTION_NOTFOUND); + msg = RSEUIPlugin.getPluginMessage(MSG_ERROR_CONNECTION_NOTFOUND); msg.makeSubstitution(connName); throw new Exception(msg.getLevelOneText()); } @@ -594,7 +594,7 @@ public class SystemQualifiedRemoteFolderCombo extends Composite if (filesubsystems.length == 0) { - msg = SystemPlugin.getPluginMessage(MSG_ERROR_CONNECTION_NOTFOUND);// hmm, what else to say? + msg = RSEUIPlugin.getPluginMessage(MSG_ERROR_CONNECTION_NOTFOUND);// hmm, what else to say? msg.makeSubstitution(connName); throw new Exception(msg.getLevelOneText()); } @@ -606,12 +606,12 @@ public class SystemQualifiedRemoteFolderCombo extends Composite ss.connect(getShell()); // will throw exception if fails. } catch (InterruptedException exc) { - msg = SystemPlugin.getPluginMessage(MSG_CONNECT_CANCELLED); + msg = RSEUIPlugin.getPluginMessage(MSG_CONNECT_CANCELLED); msg.makeSubstitution(conn.getHostName()); throw new Exception(msg.getLevelOneText()); } catch (Exception exc) { - msg = SystemPlugin.getPluginMessage(MSG_CONNECT_FAILED); + msg = RSEUIPlugin.getPluginMessage(MSG_CONNECT_FAILED); msg.makeSubstitution(conn.getHostName()); throw new Exception(msg.getLevelOneText()); } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteConnectionCombo.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteConnectionCombo.java index ccaea016c84..ba0a9a7c47b 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 @@ -15,7 +15,7 @@ ********************************************************************************/ package org.eclipse.rse.files.ui.widgets; -import org.eclipse.rse.core.ISystemTypes; +import org.eclipse.rse.core.IRSESystemType; import org.eclipse.rse.model.IHost; import org.eclipse.rse.ui.widgets.SystemHostCombo; import org.eclipse.swt.SWT; @@ -28,10 +28,10 @@ import org.eclipse.swt.widgets.Composite; */ public class SystemRemoteConnectionCombo extends SystemHostCombo { - private static final String[] SYSTEM_TYPES = { ISystemTypes.SYSTEMTYPE_LINUX, - ISystemTypes.SYSTEMTYPE_LOCAL, - ISystemTypes.SYSTEMTYPE_UNIX, - ISystemTypes.SYSTEMTYPE_WINDOWS }; + private static final String[] SYSTEM_TYPES = { IRSESystemType.SYSTEMTYPE_LINUX, + IRSESystemType.SYSTEMTYPE_LOCAL, + IRSESystemType.SYSTEMTYPE_UNIX, + IRSESystemType.SYSTEMTYPE_WINDOWS }; /** * Constructor when you want to set the style. 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 5ab6bf060fe..6491a35a4b1 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 @@ -122,7 +122,7 @@ public class SystemRemoteFolderCombo extends Composite implements ISystemCombo * connections they can create. * @param systemTypes An array of system type names * - * @see org.eclipse.rse.core.ISystemTypes + * @see org.eclipse.rse.core.IRSESystemType */ public void setSystemTypes(String[] systemTypes) { @@ -134,7 +134,7 @@ public class SystemRemoteFolderCombo extends Composite implements ISystemCombo * * @param systemType The name of the system type to restrict to * - * @see org.eclipse.rse.core.ISystemTypes + * @see org.eclipse.rse.core.IRSESystemType */ public void setSystemType(String systemType) { 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 cf88d8ea5ec..408fb211ac7 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 @@ -28,7 +28,6 @@ import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.rse.core.SystemAdapterHelpers; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemRemoteObjectMatcher; import org.eclipse.rse.files.ui.ISystemAddFileListener; import org.eclipse.rse.filters.ISystemFilter; @@ -46,6 +45,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConf import org.eclipse.rse.subsystems.files.core.util.SystemRemoteFileMatcher; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.dialogs.SystemPromptDialog; import org.eclipse.rse.ui.messages.ISystemMessageLine; @@ -168,8 +168,8 @@ public class SystemSelectRemoteFileOrFolderForm this.fileMode = fileMode; callerInstanceOfWizardPage = (caller instanceof WizardPage); callerInstanceOfSystemPromptDialog = (caller instanceof SystemPromptDialog); - //rb = SystemPlugin.getResourceBundle(); - sr = SystemPlugin.getTheSystemRegistry(); + //rb = RSEUIPlugin.getResourceBundle(); + sr = RSEUIPlugin.getTheSystemRegistry(); // set default GUI verbage = fileMode ? SystemFileResources.RESID_SELECTFILE_VERBAGE: SystemFileResources.RESID_SELECTDIRECTORY_VERBAGE; @@ -246,7 +246,7 @@ public class SystemSelectRemoteFileOrFolderForm * Restrict to certain system types * @param systemTypes the system types to restrict what connections are shown and what types of connections * the user can create - * @see org.eclipse.rse.core.ISystemTypes + * @see org.eclipse.rse.core.IRSESystemType */ public void setSystemTypes(String[] systemTypes) { @@ -286,7 +286,7 @@ public class SystemSelectRemoteFileOrFolderForm setSystemConnection(connection); setShowNewConnectionPrompt(false); setAutoExpandDepth(1); - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(connection); IRemoteFileSubSystemConfiguration ssf = ss.getParentRemoteFileSubSystemFactory(); RemoteFileFilterString rffs = new RemoteFileFilterString(ssf); @@ -331,7 +331,7 @@ public class SystemSelectRemoteFileOrFolderForm { preSelectFilter = filter; preSelectFilterChild = folderAbsolutePath; - //SystemPlugin.logInfo("in setRootFolder. Given: " + folderAbsolutePath); + //RSEUIPlugin.logInfo("in setRootFolder. Given: " + folderAbsolutePath); } } @@ -347,7 +347,7 @@ public class SystemSelectRemoteFileOrFolderForm filters[idx] = filter; preSelectFilter = filter; - //SystemPlugin.logInfo("FILTER 2: " + filter.getFilterString()); + //RSEUIPlugin.logInfo("FILTER 2: " + filter.getFilterString()); } inputProvider.setFilterString(null); // undo what ctor did inputProvider.setQuickFilters(filters); @@ -403,7 +403,7 @@ public class SystemSelectRemoteFileOrFolderForm setRestrictFolders(parentFolder.isRoot()); setRootFolder(parentFolder); preSelectFilterChild = selection.getName(); - //SystemPlugin.logInfo("Setting preSelectFilterChild to '"+preSelectFilterChild+"'"); + //RSEUIPlugin.logInfo("Setting preSelectFilterChild to '"+preSelectFilterChild+"'"); } else { diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFilesForm.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFilesForm.java index 27a3675127b..b99c2fee40c 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFilesForm.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFilesForm.java @@ -21,13 +21,13 @@ import java.util.Iterator; import java.util.Map; import org.eclipse.jface.viewers.ICheckStateListener; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.SystemFileTreeAndListGroup; import org.eclipse.rse.files.ui.actions.SystemSelectFileTypesAction; 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.RemoteFileRoot; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.messages.ISystemMessageLine; import org.eclipse.rse.ui.messages.SystemMessageDialog; @@ -163,7 +163,7 @@ public class SystemSelectRemoteFilesForm extends Composite * connections they can create. * @param systemTypes An array of system type names * - * @see org.eclipse.rse.core.ISystemTypes + * @see org.eclipse.rse.core.IRSESystemType */ public void setSystemTypes(String[] systemTypes) { @@ -175,7 +175,7 @@ public class SystemSelectRemoteFilesForm extends Composite * * @param systemType The name of the system type to restrict to * - * @see org.eclipse.rse.core.ISystemTypes + * @see org.eclipse.rse.core.IRSESystemType */ public void setSystemType(String systemType) { @@ -601,7 +601,7 @@ public class SystemSelectRemoteFilesForm extends Composite { if (msgLine != null) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_OCCURRED); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_OCCURRED); msg.makeSubstitution(exc); msgLine.setErrorMessage(msg); } 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 ea94235b10a..e5ecdffe925 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 @@ -21,7 +21,6 @@ import java.util.Vector; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.filters.ISystemFilter; @@ -43,6 +42,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileIOException; import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSecurityException; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.rse.ui.view.ISystemTree; import org.eclipse.rse.ui.wizards.AbstractSystemWizard; @@ -65,10 +65,10 @@ public class SystemNewFileWizard public SystemNewFileWizard() { super(FileResources.RESID_NEWFILE_TITLE, -// SystemPlugin.getDefault().getImageDescriptorFromIDE("wizban/newfile_wiz.gif") - // SystemPlugin.getDefault().getImageDescriptor("wizban/newfile_wiz.gif") +// RSEUIPlugin.getDefault().getImageDescriptorFromIDE("wizban/newfile_wiz.gif") + // RSEUIPlugin.getDefault().getImageDescriptor("wizban/newfile_wiz.gif") - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILEWIZARD_ID)); + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILEWIZARD_ID)); } /** @@ -129,7 +129,7 @@ public class SystemNewFileWizard if (!parentFolder.exists()) { /* Be nice to do this someday... - msg = SystemPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTFOUND_WANTTOCREATE); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTFOUND_WANTTOCREATE); msg.makeSubstitution(parentFolder.getAbsolutePath()); SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), msg); if (msgDlg.openQuestionNoException()) @@ -139,15 +139,15 @@ public class SystemNewFileWizard } catch (RemoteFileIOException exc) { - SystemPlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileIOException " ); - msg = (SystemPlugin.getPluginMessage(FILEMSG_CREATE_FOLDER_FAILED_EXIST)).makeSubstitution(parentFolder.getAbsolutePath()); + RSEUIPlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileIOException " ); + msg = (RSEUIPlugin.getPluginMessage(FILEMSG_CREATE_FOLDER_FAILED_EXIST)).makeSubstitution(parentFolder.getAbsolutePath()); mainPage.setMessage(msg); return false; } catch (RemoteFileSecurityException exc) { - SystemPlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileSecurityException " ); - msg = (SystemPlugin.getPluginMessage(FILEMSG_CREATE_FOLDER_FAILED)).makeSubstitution(parentFolder.getAbsolutePath()); + RSEUIPlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileSecurityException " ); + msg = (RSEUIPlugin.getPluginMessage(FILEMSG_CREATE_FOLDER_FAILED)).makeSubstitution(parentFolder.getAbsolutePath()); mainPage.setMessage(msg); return false; } @@ -155,7 +155,7 @@ public class SystemNewFileWizard else */ { - msg = SystemPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTFOUND); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTFOUND); msg.makeSubstitution(parentFolder.getAbsolutePath()); mainPage.setMessage(msg); return false; @@ -175,12 +175,12 @@ public class SystemNewFileWizard newFile = rfss.createFile(newFilePath); } catch (RemoteFileIOException exc ) { SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileIOException " ); - msg = (SystemPlugin.getPluginMessage(FILEMSG_CREATE_FILE_FAILED_EXIST)).makeSubstitution(absName); + msg = (RSEUIPlugin.getPluginMessage(FILEMSG_CREATE_FILE_FAILED_EXIST)).makeSubstitution(absName); mainPage.setMessage(msg); ok = false; //DY } catch (Exception RemoteFileSecurityException) { } catch (RemoteFileSecurityException e) { - msg = (SystemPlugin.getPluginMessage(FILEMSG_CREATE_FILE_FAILED)).makeSubstitution(absName); + msg = (RSEUIPlugin.getPluginMessage(FILEMSG_CREATE_FILE_FAILED)).makeSubstitution(absName); SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileSecurityException "); //SystemMessage.displayErrorMessage(SystemMessage.getDefaultShell(), msg); mainPage.setMessage(msg); @@ -243,7 +243,7 @@ public class SystemNewFileWizard meets = parentSubSystem.doesFilterMatch(selectedFilterRef.getReferencedFilter(),newAbsName); if (!meets) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_RESOURCE_NOTVISIBLE); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_RESOURCE_NOTVISIBLE); SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), msg); if (msgDlg.openQuestionNoException()) // ask user if they want to proceed meets = true; // they do, so pretend it meets the criteria @@ -262,7 +262,7 @@ public class SystemNewFileWizard protected static void updateGUI(IRemoteFile parentFolder, IRemoteFile newFileOrFolder, Viewer viewer, boolean isInputAFilter, ISystemFilterReference selectedFilterRef) { - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); if (selectedFilterRef != null) { selectedFilterRef.markStale(true); @@ -366,7 +366,7 @@ public class SystemNewFileWizard v.add(folder); //else //{ - // SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTFOUND); + // SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTFOUND); // msg.makeSubstitution(pathName); // lastExc = new SystemMessageException(msg); //} diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFileWizardMainPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFileWizardMainPage.java index 736dc244430..f436642ea91 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFileWizardMainPage.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFileWizardMainPage.java @@ -17,12 +17,12 @@ package org.eclipse.rse.files.ui.wizards; import org.eclipse.jface.wizard.Wizard; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.FileResources; 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.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.messages.ISystemMessageLine; import org.eclipse.rse.ui.validators.ISystemValidator; @@ -103,7 +103,7 @@ public class SystemNewFileWizardMainPage } ); - SystemWidgetHelpers.setCompositeHelp(composite_prompts, SystemPlugin.HELPPREFIX+NEW_FILE_WIZARD); + SystemWidgetHelpers.setCompositeHelp(composite_prompts, RSEUIPlugin.HELPPREFIX+NEW_FILE_WIZARD); return composite_prompts; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFolderWizard.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFolderWizard.java index e5107eac930..55f4fc217cc 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 @@ -18,7 +18,6 @@ package org.eclipse.rse.files.ui.wizards; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.FileResources; import org.eclipse.rse.filters.ISystemFilter; import org.eclipse.rse.filters.ISystemFilterReference; @@ -30,6 +29,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileIOException; import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSecurityException; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.rse.ui.wizards.AbstractSystemWizard; @@ -51,8 +51,8 @@ public class SystemNewFolderWizard public SystemNewFolderWizard() { super(FileResources.RESID_NEWFOLDER_TITLE, - // SystemPlugin.getDefault().getImageDescriptorFromIDE("wizban/newfolder_wiz.gif") - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFOLDERWIZARD_ID) + // RSEUIPlugin.getDefault().getImageDescriptorFromIDE("wizban/newfolder_wiz.gif") + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFOLDERWIZARD_ID) ); } @@ -114,7 +114,7 @@ public class SystemNewFolderWizard if (!parentFolder.exists()) { /* Be nice to do this someday... - msg = SystemPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTFOUND_WANTTOCREATE); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTFOUND_WANTTOCREATE); msg.makeSubstitution(parentFolder.getAbsolutePath()); SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), msg); if (msgDlg.openQuestionNoException()) @@ -124,15 +124,15 @@ public class SystemNewFolderWizard } catch (RemoteFileIOException exc) { - SystemPlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileIOException " ); - msg = (SystemPlugin.getPluginMessage(FILEMSG_CREATE_FOLDER_FAILED_EXIST)).makeSubstitution(parentFolder.getAbsolutePath()); + RSEUIPlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileIOException " ); + msg = (RSEUIPlugin.getPluginMessage(FILEMSG_CREATE_FOLDER_FAILED_EXIST)).makeSubstitution(parentFolder.getAbsolutePath()); mainPage.setMessage(msg); return false; } catch (RemoteFileSecurityException exc) { - SystemPlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileSecurityException " ); - msg = (SystemPlugin.getPluginMessage(FILEMSG_CREATE_FOLDER_FAILED)).makeSubstitution(parentFolder.getAbsolutePath()); + RSEUIPlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileSecurityException " ); + msg = (RSEUIPlugin.getPluginMessage(FILEMSG_CREATE_FOLDER_FAILED)).makeSubstitution(parentFolder.getAbsolutePath()); mainPage.setMessage(msg); return false; } @@ -140,7 +140,7 @@ public class SystemNewFolderWizard else */ { - msg = SystemPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTFOUND); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTFOUND); msg.makeSubstitution(parentFolder.getAbsolutePath()); mainPage.setMessage(msg); return false; @@ -166,14 +166,14 @@ public class SystemNewFolderWizard } else { - msg = (SystemPlugin.getPluginMessage(FILEMSG_CREATE_FOLDER_FAILED_EXIST)).makeSubstitution(absName); + msg = (RSEUIPlugin.getPluginMessage(FILEMSG_CREATE_FOLDER_FAILED_EXIST)).makeSubstitution(absName); } mainPage.setMessage(msg); ok = false; // DY } catch (Exception RemoteFileSecurityException) { } catch (RemoteFileSecurityException e) { SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileSecurityException "); - msg = (SystemPlugin.getPluginMessage(FILEMSG_CREATE_FOLDER_FAILED)).makeSubstitution(absName); + msg = (RSEUIPlugin.getPluginMessage(FILEMSG_CREATE_FOLDER_FAILED)).makeSubstitution(absName); //SystemMessage.displayErrorMessage(SystemMessage.getDefaultShell(), msg); mainPage.setMessage(msg); ok = false; @@ -228,7 +228,7 @@ public class SystemNewFolderWizard } if (!meets) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_RESOURCE_NOTVISIBLE); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_RESOURCE_NOTVISIBLE); SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), msg); if (msgDlg.openQuestionNoException()) // ask user if they want to proceed meets = true; // they do, so pretend it meets the criteria diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFolderWizardMainPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFolderWizardMainPage.java index 2e979356fc2..9d1da17c25f 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFolderWizardMainPage.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/wizards/SystemNewFolderWizardMainPage.java @@ -17,12 +17,12 @@ package org.eclipse.rse.files.ui.wizards; import org.eclipse.jface.wizard.Wizard; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.files.ui.FileResources; 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.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.messages.ISystemMessageLine; import org.eclipse.rse.ui.validators.ISystemValidator; @@ -67,7 +67,7 @@ public class SystemNewFolderWizardMainPage super(wizard, "NewFolder", FileResources.RESID_NEWFOLDER_PAGE1_TITLE, FileResources.RESID_NEWFOLDER_PAGE1_DESCRIPTION); - // nameValidator = new ValidatorProfileName(SystemPlugin.getTheSystemRegistry().getAllSystemProfileNamesVector()); + // nameValidator = new ValidatorProfileName(RSEUIPlugin.getTheSystemRegistry().getAllSystemProfileNamesVector()); nameValidator = new ValidatorUniqueString(allnames, true); this.parentFolders = parentFolders; } @@ -107,7 +107,7 @@ public class SystemNewFolderWizardMainPage } ); - SystemWidgetHelpers.setCompositeHelp(composite_prompts, SystemPlugin.HELPPREFIX+NEW_FOLDER_WIZARD); + SystemWidgetHelpers.setCompositeHelp(composite_prompts, RSEUIPlugin.HELPPREFIX+NEW_FOLDER_WIZARD); return composite_prompts; diff --git a/rse/plugins/org.eclipse.rse.processes.ui/plugin.xml b/rse/plugins/org.eclipse.rse.processes.ui/plugin.xml index 53df753565b..c9fd69b905d 100644 --- a/rse/plugins/org.eclipse.rse.processes.ui/plugin.xml +++ b/rse/plugins/org.eclipse.rse.processes.ui/plugin.xml @@ -18,11 +18,11 @@ Contributors: - + \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/model/DStoreFileAdapter.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/model/DStoreFileAdapter.java index be454c3448f..877db971ed2 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/model/DStoreFileAdapter.java +++ b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/model/DStoreFileAdapter.java @@ -21,7 +21,6 @@ import java.util.List; import org.eclipse.rse.connectorservice.dstore.DStoreConnectorService; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.services.dstore.files.DStoreHostFile; import org.eclipse.rse.services.dstore.files.DStoreVirtualHostFile; import org.eclipse.rse.services.files.IHostFile; @@ -31,6 +30,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext; import org.eclipse.rse.subsystems.files.dstore.subsystem.RemoteFilePropertyChangeListener; import org.eclipse.rse.ui.ISystemPreferencesConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.dstore.core.model.DataElement; @@ -51,7 +51,7 @@ public class DStoreFileAdapter implements IHostFileToRemoteFileAdapter public IRemoteFile[] convertToRemoteFiles(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile[] nodes) { registerFilePropertyChangeListener(ss); - boolean showHidden = SystemPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.SHOWHIDDEN); + boolean showHidden = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.SHOWHIDDEN); List results = new ArrayList(); for (int i = 0; i < nodes.length; i++) diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/DownloadListener.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/DownloadListener.java index 0e4043d74a3..bb216c2a76b 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/DownloadListener.java +++ b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/DownloadListener.java @@ -22,13 +22,13 @@ import java.io.File; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.rse.connectorservice.dstore.util.ICommunicationsDiagnosticFactory; -import org.eclipse.rse.core.SystemPlugin; 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.dstore.universal.miners.IUniversalDataStoreConstants; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; @@ -53,7 +53,7 @@ public class DownloadListener implements IDomainListener, ICommunicationsListene private boolean _isCancelled = false; private long _totalBytesNotified = 0; private long _totalLength; - private static SystemMessage _percentMsg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_PERCENT_DONE); + private static SystemMessage _percentMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_PERCENT_DONE); public DownloadListener(Shell shell, IProgressMonitor monitor, IConnectorService system, DataElement status, File localFile, String remotePath, long totalLength) { diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/SearchResultsChangeListener.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/SearchResultsChangeListener.java index fe826cce6d9..71166f758a8 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/SearchResultsChangeListener.java +++ b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/old/SearchResultsChangeListener.java @@ -19,7 +19,6 @@ package org.eclipse.rse.subsystems.files.dstore.old; import java.util.ArrayList; import java.util.List; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.CommunicationsEvent; import org.eclipse.rse.core.subsystems.ICommunicationsListener; import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants; @@ -41,6 +40,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.RemoteSearchResultsConte import org.eclipse.rse.subsystems.files.dstore.model.DStoreFile; import org.eclipse.rse.subsystems.files.dstore.model.DStoreSearchResult; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; @@ -83,7 +83,7 @@ public class SearchResultsChangeListener implements IDomainListener, ICommunicat _lastUpdateTime = 0; - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); //_factory = ((FileServiceSubSystem)_subsys).getRemoteFileFactory(); @@ -157,7 +157,7 @@ public class SearchResultsChangeListener implements IDomainListener, ICommunicat } private void handleSearchResults() { - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); // append new results to existing results List results = _status.getNestedData(); @@ -322,7 +322,7 @@ public class SearchResultsChangeListener implements IDomainListener, ICommunicat if (totalSize >= MAX_RESULTS) { RemoteSearchResult warning = new RemoteSearchResult(_searchConfig, _searchConfig, _searchConfig.getSearchString()); warning.setLine(0); - warning.setText(SystemPlugin.getPluginMessage(ISystemMessages.MSG_LIST_CANCELLED).getLevelOneText()); + warning.setText(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_LIST_CANCELLED).getLevelOneText()); _searchConfig.addResult(warning); } @@ -354,7 +354,7 @@ public class SearchResultsChangeListener implements IDomainListener, ICommunicat _searchConfig.setStatus(IRemoteSearchConstants.DISCONNECTED); } - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); registry.fireEvent(new SystemResourceChangeEvent(_searchConfig, ISystemResourceChangeEvents.EVENT_SEARCH_FINISHED, null)); } diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/RemoteFilePropertyChangeListener.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/RemoteFilePropertyChangeListener.java index f7a5922f29f..3452b3cc017 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/RemoteFilePropertyChangeListener.java +++ b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/subsystem/RemoteFilePropertyChangeListener.java @@ -20,7 +20,6 @@ import java.util.ArrayList; import java.util.List; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.CommunicationsEvent; import org.eclipse.rse.core.subsystems.ICommunicationsListener; import org.eclipse.rse.core.subsystems.IConnectorService; @@ -30,6 +29,7 @@ import org.eclipse.rse.model.ISystemResourceChangeEvents; import org.eclipse.rse.subsystems.files.core.SystemFileResources; import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem; import org.eclipse.rse.subsystems.files.dstore.model.DStoreFile; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.progress.UIJob; @@ -129,7 +129,7 @@ public class RemoteFilePropertyChangeListener implements IDomainListener, this._fileSubSystem = fileSS; this.dataStore = dataStore; this.system = system; - this._registry = SystemPlugin.getTheSystemRegistry(); + this._registry = RSEUIPlugin.getTheSystemRegistry(); system.addCommunicationsListener(this); dataStore.getDomainNotifier().addDomainListener(this); } diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.xml b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.xml index 5b0e5e3f1d6..42622ceacad 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.xml +++ b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.xml @@ -22,7 +22,7 @@ Contributors: = 0; i--) { IRemoteCommandShell cmdShell = (IRemoteCommandShell) _cmdShells.get(i); @@ -718,7 +718,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd public void run() { - SystemPlugin.getTheSystemRegistry().fireEvent( + RSEUIPlugin.getTheSystemRegistry().fireEvent( new SystemResourceChangeEvent(_ss, ISystemResourceChangeEvents.EVENT_COMMAND_SHELL_REMOVED, _ss)); } @@ -837,7 +837,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd } } - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); registry.fireEvent(new SystemResourceChangeEvent(this, ISystemResourceChangeEvents.EVENT_REFRESH, this)); return cmdShell; @@ -1029,7 +1029,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd msg = getRunningMessage(_cmd); if (!implicitConnect(false, mon, msg, totalWorkUnits)) - throw new Exception(SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution( + throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution( getHostName()).getLevelOneText()); runOutputs = internalRunCommand(mon, _cmd, _runContext, _runInterpret); } @@ -1061,7 +1061,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd int totalWorkUnits = IProgressMonitor.UNKNOWN; if (!implicitConnect(false, mon, msg, totalWorkUnits)) - throw new Exception(SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution( + throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution( getHostName()).getLevelOneText()); runOutputs = new Object[] { @@ -1096,7 +1096,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd int totalWorkUnits = IProgressMonitor.UNKNOWN; if (!implicitConnect(false, mon, msg, totalWorkUnits)) - throw new Exception(SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution( + throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution( getHostName()).getLevelOneText()); internalCancelShell(mon, _runContext); } @@ -1136,7 +1136,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd msg = getRunningMessage(_cmd); if (!implicitConnect(false, mon, msg, totalWorkUnits)) - throw new Exception(SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution( + throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution( getHostName()).getLevelOneText()); internalSendCommandToShell(mon, _cmd, _runContext); } @@ -1169,7 +1169,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd int totalWorkUnits = IProgressMonitor.UNKNOWN; if (!implicitConnect(false, mon, msg, totalWorkUnits)) - throw new Exception(SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution( + throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution( getHostName()).getLevelOneText()); internalRemoveShell(_runContext); } diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteCmdSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteCmdSubSystemConfiguration.java index f08b6e41e80..36173029b7f 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteCmdSubSystemConfiguration.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteCmdSubSystemConfiguration.java @@ -146,7 +146,7 @@ public abstract class RemoteCmdSubSystemConfiguration extends SubSystemConfigura */ protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr) { - //SystemPlugin.logDebugMessage(this.getClass().getName(),"in createDefaultFilterPool for remote file subsystem factory"); + //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"in createDefaultFilterPool for remote file subsystem factory"); ISystemFilterPool pool = null; //try { // ----------------------------------------------------- @@ -163,7 +163,7 @@ public abstract class RemoteCmdSubSystemConfiguration extends SubSystemConfigura //} //} catch (Exception exc) //{ - //SystemPlugin.logError("Error creating default filter pool",exc); + //RSEUIPlugin.logError("Error creating default filter pool",exc); //} return pool; } diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteCommandShell.java index de59f20b641..bbbbd6b0b9a 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteCommandShell.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteCommandShell.java @@ -21,7 +21,6 @@ import java.util.List; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.Platform; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.model.IHost; import org.eclipse.rse.model.ISystemRegistry; @@ -31,6 +30,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem; import org.eclipse.rse.subsystems.shells.core.subsystems.ICandidateCommand; import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem; import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell; +import org.eclipse.rse.ui.RSEUIPlugin; public abstract class RemoteCommandShell implements IAdaptable, IRemoteCommandShell @@ -183,7 +183,7 @@ public abstract class RemoteCommandShell implements IAdaptable, IRemoteCommandSh try { IHost host = _fileSubSystem.getHost(); - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); ISubSystem[] sses = sr.getSubSystems(host); for (int i = 0; i < sses.length; i++) { diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShellOperation.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShellOperation.java index a394efb682c..50cfade6c3a 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShellOperation.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShellOperation.java @@ -21,7 +21,6 @@ import java.util.Stack; import org.eclipse.core.resources.IProject; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.ISystemResourceChangeEvent; import org.eclipse.rse.model.ISystemResourceChangeEvents; import org.eclipse.rse.model.ISystemResourceChangeListener; @@ -29,6 +28,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem; import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell; import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteOutput; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.widgets.Shell; @@ -103,7 +103,7 @@ public abstract class RemoteCommandShellOperation implements ISystemResourceChan { try { - SystemPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this); _remoteCmdShell = _cmdSubSystem.runShell(getShell(), _pwd); } catch (Exception e) @@ -131,7 +131,7 @@ public abstract class RemoteCommandShellOperation implements ISystemResourceChan */ public void finish() { - SystemPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this); if (_remoteCmdShell != null && _remoteCmdShell.isActive()) { try diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/SimpleCommandOperation.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/SimpleCommandOperation.java index 14ea7054608..bbbd933ca90 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/SimpleCommandOperation.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/SimpleCommandOperation.java @@ -42,6 +42,11 @@ public class SimpleCommandOperation Object[] result =_subsystem.runCommand(command, null, _workingDirectory, false); _cmdShell = (IRemoteCommandShell)result[0]; } + + public IRemoteCommandShell getCommandShell() + { + return _cmdShell; + } public void putInput(String input) throws Exception { diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java index cab317e733b..6a1bbe64bc8 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java @@ -21,7 +21,7 @@ import java.util.ArrayList; import java.util.List; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.rse.core.ISystemTypes; +import org.eclipse.rse.core.IRSESystemType; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.servicesubsystem.IServiceSubSystemConfiguration; import org.eclipse.rse.core.subsystems.IConnectorService; @@ -60,11 +60,11 @@ public final class ShellServiceSubSystem extends RemoteCmdSubSystem implements I { if (_userHome == null) { - if (getSystemType() == ISystemTypes.SYSTEMTYPE_WINDOWS) + if (getSystemType() == IRSESystemType.SYSTEMTYPE_WINDOWS) { _userHome = "c:\\"; } - else if (getSystemType() == ISystemTypes.SYSTEMTYPE_LOCAL) + else if (getSystemType() == IRSESystemType.SYSTEMTYPE_LOCAL) { _userHome = System.getProperty("user.home"); } diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/plugin.xml b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/plugin.xml index b22cb8998eb..69abc385007 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/plugin.xml +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/plugin.xml @@ -25,7 +25,7 @@ Contributors: IRSESystemType.getProperty(String). + * + * @see org.eclipse.core.runtime.IRSESystemType#getProperty(String) + */ +public interface IRSESystemTypeConstants { + + public static final String ICON = "icon"; + public static final String ICON_LIVE = "iconLive"; + public static final String ENABLE_OFFLINE = "enableOffline"; +} diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRSEUIRegistry.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRSEUIRegistry.java new file mode 100644 index 00000000000..dce401ddb30 --- /dev/null +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRSEUIRegistry.java @@ -0,0 +1,20 @@ +/******************************************************************************** + * 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: + * Kushal Munir (IBM) - Initial API and implementation + ********************************************************************************/ +package org.eclipse.rse.ui; + +/** + * Interface for RSE UI registry. Clients should use this interface as the starting point for querying and + * manipulating UI elements in the RSE framework, such as adapters. + * + * This interface is not intended to be implemented by clients. + */ +public interface IRSEUIRegistry { + +} diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java index 14ddc5ee3b7..f24be82fd6d 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java @@ -90,6 +90,7 @@ public interface ISystemMessages public static final String MSG_VALIDATE_PASSWORD_EMPTY = "RSEG1035"; //MSG_VALIDATE_PREFIX + "PasswordRequired"; public static final String MSG_VALIDATE_PASSWORD_EXPIRED = "RSEG1036"; //MSG_VALIDATE_PREFIX + "PasswordExpired"; + public static final String MSG_VALIDATE_PASSWORD_INVALID = "RSEG1297"; public static final String MSG_VALIDATE_FILTERSTRING_EMPTY = "RSEG1045"; public static final String MSG_VALIDATE_FILTERSTRING_NOTUNIQUE= "RSEG1046"; public static final String MSG_VALIDATE_FILTERSTRING_NOTVALID = "RSEG1047"; @@ -410,6 +411,9 @@ public interface ISystemMessages public static final String MSG_COMM_SERVER_OLDER_WARNING = "RSEC2308"; public static final String MSG_COMM_CLIENT_OLDER_WARNING = "RSEC2309"; + public static final String MSG_COMM_USING_SSL = "RSEC2314"; + public static final String MSG_COMM_NOT_USING_SSL = "RSEC2315"; + // Unexpected error message public static final String MSG_ERROR_UNEXPECTED = "RSEF8002"; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemPreferencesConstants.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemPreferencesConstants.java index 663d5a7f4ab..3039bc539fb 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemPreferencesConstants.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemPreferencesConstants.java @@ -55,7 +55,10 @@ public interface ISystemPreferencesConstants public static final String UPLOAD_BUFFER_SIZE = ROOT + "upload.buffer.size"; public static final String VERIFY_CONNECTION = ROOT + "verify.connection"; - + + public static final String ALERT_SSL = ROOT + "alert.ssl"; + public static final String ALERT_NONSSL = ROOT + "alert.nonssl"; + // DEFAULTS public static final boolean DEFAULT_SHOWFILTERPOOLS = false; public static final boolean DEFAULT_QUALIFY_CONNECTION_NAMES = false; @@ -67,7 +70,7 @@ public interface ISystemPreferencesConstants public static final String DEFAULT_ORDER_CONNECTIONS = ""; public static final String DEFAULT_HISTORY_FOLDER = ""; public static final boolean DEFAULT_SHOW_HIDDEN = true; - public static final boolean DEFAULT_SHOWNEWCONNECTIONPROMPT = true; + public static final boolean DEFAULT_SHOWNEWCONNECTIONPROMPT = false; public static final boolean DEFAULT_REMEMBER_STATE = true; // changed in R2. Phil public static final boolean DEFAULT_RESTORE_STATE_FROM_CACHE = true; // yantzi: artemis 6.0 public static final boolean DEFAULT_CASCADE_UDAS_BYPROFILE = false; @@ -90,4 +93,8 @@ public interface ISystemPreferencesConstants public static final int DEFAULT_DOWNLOAD_BUFFER_SIZE = 4; public static final boolean DEFAULT_VERIFY_CONNECTION = true; + + public static final boolean DEFAULT_ALERT_SSL = true; + public static final boolean DEFAULT_ALERT_NON_SSL = true; + } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEAdapter.java new file mode 100644 index 00000000000..48c5abd371d --- /dev/null +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEAdapter.java @@ -0,0 +1,49 @@ +/******************************************************************************** + * 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.ui; + +import org.eclipse.ui.model.WorkbenchAdapter; + +/** + * Abstract base class with basic implementations of the IRSEAdapter interface. + * Intended to be subclassed. + */ +public abstract class RSEAdapter extends WorkbenchAdapter implements IRSEAdapter { + + /** + * Constructor. + */ + public RSEAdapter() { + super(); + } + + /** + * The default implementation of this IRSEAdapter method returns the empty string. + * Subclasses may override. + * @see org.eclipse.rse.ui.IRSEAdapter#getDescription(java.lang.Object) + */ + public String getDescription(Object object) { + return ""; + } + + /** + * Returns the RSE UI registry. + * @see org.eclipse.rse.ui.IRSEAdapter#getRegistry() + */ + public IRSEUIRegistry getRegistry() { + return RSEUIPlugin.getDefault().getRegistry(); + } +} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSESystemTypeAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSESystemTypeAdapter.java new file mode 100644 index 00000000000..8e8855cccd2 --- /dev/null +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSESystemTypeAdapter.java @@ -0,0 +1,172 @@ +/******************************************************************************** + * 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.ui; + +import java.net.MalformedURLException; +import java.net.URL; + +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Platform; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.rse.core.IRSESystemType; +import org.osgi.framework.Bundle; + +/** + * Adapter for RSE system types. + */ +public class RSESystemTypeAdapter extends RSEAdapter implements IRSESystemTypeConstants { + + public RSESystemTypeAdapter() { + super(); + } + + /** + * @see org.eclipse.ui.model.WorkbenchAdapter#getImageDescriptor(java.lang.Object) + */ + public ImageDescriptor getImageDescriptor(Object object) { + return getImage(object, ICON); + } + + /** + * @see org.eclipse.ui.model.WorkbenchAdapter#getImageDescriptor(java.lang.Object) + */ + public ImageDescriptor getLiveImageDescriptor(Object object) { + return getImage(object, ICON_LIVE); + } + + private ImageDescriptor getImage(Object object, String propertyKey) { + + if ((object != null) && (object instanceof IRSESystemType)) { + IRSESystemType sysType = (IRSESystemType)object; + + String property = sysType.getProperty(propertyKey); + + if (property != null) { + return getImage(property, sysType.getDefiningBundle()); + } + else { + return null; + } + } + else { + return null; + } + } + + /** + * Create a descriptor from the argument absolute or relative path to an + * image file. bundle parameter is used as the base for relative paths and + * is allowed to be null. + * + * @param value + * the absolute or relative path + * @param definingBundle + * bundle to be used for relative paths (may be null) + * @return + */ + public static ImageDescriptor getImage(String value, Bundle definingBundle) { + URL url = getUrl(value, definingBundle); + return url == null ? null : ImageDescriptor.createFromURL(url); + } + + /** + * Create an url from the argument absolute or relative path. The bundle + * parameter is used as the base for relative paths and is allowed to be + * null. + * + * @param value + * the absolute or relative path + * @param definingBundle + * bundle to be used for relative paths (may be null) + * @return + */ + public static URL getUrl(String value, Bundle definingBundle) { + try { + if (value != null) + return new URL(value); + } catch (MalformedURLException e) { + if (definingBundle != null) + return Platform.find(definingBundle, new Path(value)); + } + + return null; + } + + /** + * Returns the name of the system type if the object passed in is of type IRSESystemType. + * Otherwise, returns the value of the parent implementation. + * @see org.eclipse.ui.model.WorkbenchAdapter#getLabel(java.lang.Object) + */ + public String getLabel(Object object) { + + if ((object != null) && (object instanceof IRSESystemType)) { + return ((IRSESystemType)object).getName(); + } + else { + return super.getLabel(object); + } + } + + /** + * Returns the description of the system type if the object passed in is of type IRSESystemType. + * Otherwise, returns the value of the parent implementation. + * @see org.eclipse.rse.ui.RSEAdapter#getDescription(java.lang.Object) + */ + public String getDescription(Object object) { + + if ((object != null) && (object instanceof IRSESystemType)) { + return ((IRSESystemType)object).getDescription(); + } + else { + return super.getDescription(object); + } + } + + public boolean isEnableOffline(Object object) { + + if ((object != null) && (object instanceof IRSESystemType)) { + String property = ((IRSESystemType)object).getProperty(ENABLE_OFFLINE); + + if (property != null) { + return Boolean.valueOf(property).booleanValue(); + } + else { + return false; + } + } + else { + return false; + } + } + + public boolean isEnabled(Object object) { + //TODO + return true; + } + + public void setIsEnabled(Object object, boolean isEnabled) { + //TODO + } + + public String getDefaultUserId(Object object) { + //TODO + return ""; + } + + public void setDefaultUserId(Object object, String defaultUserId) { + //TODO + } +} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPlugin.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java similarity index 94% rename from rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPlugin.java rename to rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java index b1fbed8f0ec..23a7a69e715 100644 --- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPlugin.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java @@ -14,12 +14,9 @@ * {Name} (company) - description of contribution. ********************************************************************************/ -package org.eclipse.rse.core; +package org.eclipse.rse.ui; import java.net.InetAddress; -import java.util.ArrayList; -import java.util.List; -import java.util.StringTokenizer; import java.util.Vector; import org.eclipse.core.resources.IProject; @@ -29,6 +26,11 @@ import org.eclipse.core.runtime.IExtensionRegistry; import org.eclipse.core.runtime.IProduct; 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.SystemBasePlugin; +import org.eclipse.rse.core.SystemPropertyPageExtension; +import org.eclipse.rse.core.SystemResourceManager; import org.eclipse.rse.core.comm.ISystemKeystoreProvider; import org.eclipse.rse.core.comm.SystemCommunicationsDaemon; import org.eclipse.rse.core.comm.SystemKeystoreProviderManager; @@ -44,19 +46,16 @@ import org.eclipse.rse.model.ISystemResourceChangeEvents; import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.model.SystemStartHere; import org.eclipse.rse.persistence.IRSEPersistenceManager; -import org.eclipse.rse.persistence.IRSEPersistenceProvider; import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessageFile; -import org.eclipse.rse.ui.ISystemIconConstants; -import org.eclipse.rse.ui.ISystemPreferencesConstants; -import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.ISystemDynamicPopupMenuExtension; import org.eclipse.rse.ui.actions.SystemDynamicPopupMenuExtensionManager; import org.eclipse.rse.ui.actions.SystemShowPreferencesPageAction; +import org.eclipse.rse.ui.internal.RSESystemTypeAdapterFactory; +import org.eclipse.rse.ui.internal.RSEUIRegistry; import org.eclipse.rse.ui.propertypages.RemoteSystemsPreferencePage; import org.eclipse.rse.ui.propertypages.SystemCommunicationsPreferencePage; -import org.eclipse.rse.ui.propertypages.SystemTypeFieldEditor; import org.eclipse.rse.ui.view.SubsystemFactoryAdapterFactory; import org.eclipse.rse.ui.view.SystemViewAdapterFactory; import org.eclipse.rse.ui.view.team.SystemTeamViewResourceAdapterFactory; @@ -67,19 +66,19 @@ import org.osgi.framework.BundleContext; /** * Plugin for the core remote systems support. */ -public class SystemPlugin extends SystemBasePlugin +public class RSEUIPlugin extends SystemBasePlugin { public static final String PLUGIN_ID = "org.eclipse.rse.ui"; public static final String HELPPREFIX = "org.eclipse.rse.ui."; public static final boolean INCLUDE_LOCAL_YES = true; public static final boolean INCLUDE_LOCAL_NO = false; - private static SystemPlugin inst = null; + private static RSEUIPlugin inst = null; private static SystemMessageFile messageFile = null; private static SystemMessageFile defaultMessageFile = null; - private SystemType[] allSystemTypes = null; +// private SystemType[] allSystemTypes = null; private String enabledSystemTypes; private ISystemRegistry _systemRegistry = null; @@ -100,7 +99,7 @@ public class SystemPlugin extends SystemBasePlugin /** * Constructor for SystemsPlugin */ - public SystemPlugin() + public RSEUIPlugin() { super(); @@ -112,9 +111,9 @@ public class SystemPlugin extends SystemBasePlugin /** * Return singleton. Same as inherited getBaseDefault but returned object - * is typed as SystemPlugin versus SystemBasePlugin. + * is typed as RSEUIPlugin versus SystemBasePlugin. */ - public static SystemPlugin getDefault() + public static RSEUIPlugin getDefault() { return inst; } @@ -519,6 +518,9 @@ public class SystemPlugin extends SystemBasePlugin SubsystemFactoryAdapterFactory ssfaf = new SubsystemFactoryAdapterFactory(); ssfaf.registerWithManager(manager); + RSESystemTypeAdapterFactory rseSysTypeFactory = new RSESystemTypeAdapterFactory(); + manager.registerAdapters(rseSysTypeFactory, IRSESystemType.class); + svaf = new SystemViewAdapterFactory(); svaf.registerWithManager(manager); @@ -555,7 +557,6 @@ public class SystemPlugin extends SystemBasePlugin registerArchiveHandlers(); registerDynamicPopupMenuExtensions(); registerKeystoreProviders(); - registerPersistenceProviders(); // if first time creating the remote systems project, add some default connections... if (SystemResourceManager.isFirstTime() @@ -566,8 +567,8 @@ public class SystemPlugin extends SystemBasePlugin registry.createLocalHost(null, SystemResources.TERM_LOCAL, getLocalMachineName()); // profile, name, userId /* replaced with re-usable method by Phil, in v5.1.2 SystemConnection localConn = registry.createConnection( - //SystemResourceConstants.RESOURCE_TEAMPROFILE_NAME, ISystemTypes.SYSTEMTYPE_LOCAL, - SystemResourceConstants.RESOURCE_PRIVATEPROFILE_NAME, ISystemTypes.SYSTEMTYPE_LOCAL, + //SystemResourceConstants.RESOURCE_TEAMPROFILE_NAME, IRSESystemType.SYSTEMTYPE_LOCAL, + SystemResourceConstants.RESOURCE_PRIVATEPROFILE_NAME, IRSESystemType.SYSTEMTYPE_LOCAL, getString(ISystemConstants.TERM_LOCAL, "Local"), // connection name "localhost", // hostname "", // description @@ -707,9 +708,9 @@ public class SystemPlugin extends SystemBasePlugin for (int idx=0; idx < proxies.length; idx++) { //System.out.println("In shutdown. proxy " + proxies[idx].getId() + " active? " + proxies[idx].isSubSystemFactoryActive()); - if (proxies[idx].isSubSystemFactoryActive()) + if (proxies[idx].isSubSystemConfigurationActive()) { - ISubSystemConfiguration ssf = proxies[idx].getSubSystemFactory(); + ISubSystemConfiguration ssf = proxies[idx].getSubSystemConfiguration(); try { ssf.disconnectAllSubSystems(); @@ -739,10 +740,10 @@ public class SystemPlugin extends SystemBasePlugin * Reset the system types objects to the given array. Called by preferences * page when Defaults is pressed, and then OK/Apply. */ - public void setSystemTypes(SystemType[] systemTypes) +/* public void setSystemTypes(SystemType[] systemTypes) { allSystemTypes = systemTypes; - } + }*/ /** * Return all system type objects. Unlike {@link #getSystemTypes()}, this method @@ -752,7 +753,7 @@ public class SystemPlugin extends SystemBasePlugin * must call setSystemTypes. This is used by the preferences page. * @return array of SystemType objects, one for every systemtype extension */ - public SystemType[] getAllSystemTypes(boolean refresh) + /* public SystemType[] getAllSystemTypes(boolean refresh) { SystemType[] tempAllSystemTypes = null; @@ -869,13 +870,13 @@ public class SystemPlugin extends SystemBasePlugin } return allSystemTypes; - } + }*/ /** * Return the system type that matches the name. Don't worry about enabled state. * @param name the system type name */ - public SystemType getSystemType(String name) +/* public SystemType getSystemType(String name) { if (allSystemTypes == null) getAllSystemTypes(false); @@ -888,13 +889,13 @@ public class SystemPlugin extends SystemBasePlugin } } return null; - } + }*/ /** * Return an array of SystemType objects. These are name and image pairs registered * via plugin.xml extension points. */ - public SystemType[] getSystemTypes() +/* public SystemType[] getSystemTypes() { if (allSystemTypes == null) getAllSystemTypes(false); @@ -907,7 +908,7 @@ public class SystemPlugin extends SystemBasePlugin if (allSystemTypes[idx].isEnabled()) systemTypes[jdx++] = allSystemTypes[idx]; return systemTypes; - } + }*/ /** * Returns a qualified hostname given a potentially unqualified hostname @@ -927,7 +928,7 @@ public class SystemPlugin extends SystemBasePlugin /** * A static version for convenience. */ - public static SystemType[] getTheSystemTypes(boolean includeLocal) +/* public static SystemType[] getTheSystemTypes(boolean includeLocal) { SystemType[] allTypes = getDefault().getSystemTypes(); if (!includeLocal) @@ -936,31 +937,31 @@ public class SystemPlugin extends SystemBasePlugin int typeIdx = 0; for (int idx=0; idx 0) { if (verifyingHostName == null) { - verifyingHostName = SystemPlugin.getPluginMessage(MSG_HOSTNAME_VERIFYING); + verifyingHostName = RSEUIPlugin.getPluginMessage(MSG_HOSTNAME_VERIFYING); } try @@ -426,7 +427,7 @@ public class SystemConnectionForm catch (InvocationTargetException e) { // error found - errorMessage = SystemPlugin.getPluginMessage(MSG_HOSTNAME_NOTFOUND); + errorMessage = RSEUIPlugin.getPluginMessage(MSG_HOSTNAME_NOTFOUND); errorMessage.makeSubstitution(currentHostName); controlInError = textHostName; } @@ -507,7 +508,9 @@ public class SystemConnectionForm return false; } - return SystemPlugin.getDefault().getSystemTypeEnableOffline(defaultSystemType); + IRSESystemType sysType = RSECorePlugin.getDefault().getRegistry().getSystemType(defaultSystemType); + RSESystemTypeAdapter sysTypeAdapter = (RSESystemTypeAdapter)(sysType.getAdapter(IRSESystemType.class)); + return sysTypeAdapter.isEnableOffline(sysType); } /** @@ -644,7 +647,7 @@ public class SystemConnectionForm { profileCombo = SystemWidgetHelpers.createReadonlyCombo( composite_prompts,null,SystemResources.RESID_CONNECTION_PROFILE_TIP); - SystemWidgetHelpers.setHelp(profileCombo, SystemPlugin.HELPPREFIX + "ccon0001"); + SystemWidgetHelpers.setHelp(profileCombo, RSEUIPlugin.HELPPREFIX + "ccon0001"); } } @@ -675,7 +678,7 @@ public class SystemConnectionForm labelConnectionName.setToolTipText(SystemResources.RESID_CONNECTION_CONNECTIONNAME_TIP); textConnectionName = SystemWidgetHelpers.createTextField( composite_prompts,null,SystemResources.RESID_CONNECTION_CONNECTIONNAME_TIP); - SystemWidgetHelpers.setHelp(textConnectionName, SystemPlugin.HELPPREFIX + "ccon0002"); + SystemWidgetHelpers.setHelp(textConnectionName, RSEUIPlugin.HELPPREFIX + "ccon0002"); // SYSTEMTYPE PROMPT IN CREATE MODE //if (!updateMode) @@ -686,7 +689,7 @@ public class SystemConnectionForm labelSystemType.setToolTipText(SystemResources.RESID_CONNECTION_SYSTEMTYPE_TIP); textSystemType = SystemWidgetHelpers.createSystemTypeCombo(composite_prompts,null,restrictSystemTypesTo); textSystemType.setToolTipText(SystemResources.RESID_CONNECTION_SYSTEMTYPE_TIP); - SystemWidgetHelpers.setHelp(textSystemType, SystemPlugin.HELPPREFIX + "ccon0003"); + SystemWidgetHelpers.setHelp(textSystemType, RSEUIPlugin.HELPPREFIX + "ccon0003"); } // HOSTNAME PROMPT @@ -705,7 +708,7 @@ public class SystemConnectionForm textHostName = SystemWidgetHelpers.createHostNameCombo(composite_prompts,null,defaultSystemType); textHostName.setToolTipText(SystemResources.RESID_CONNECTION_HOSTNAME_TIP); - SystemWidgetHelpers.setHelp(textHostName, SystemPlugin.HELPPREFIX + "ccon0004"); + SystemWidgetHelpers.setHelp(textHostName, RSEUIPlugin.HELPPREFIX + "ccon0004"); // USERID PROMPT /* We are testing the usability of not prompting for the user ID, so that the @@ -718,7 +721,7 @@ public class SystemConnectionForm labelUserId.setToolTipText(SystemResources.RESID_CONNECTION_DEFAULTUSERID_TIP); textUserId = SystemWidgetHelpers.createInheritableTextField( composite_prompts,SystemResources.RESID_CONNECTION_DEFAULTUSERID_INHERITBUTTON_TIP,SystemResources.RESID_CONNECTION_DEFAULTUSERID_TIP); - SystemWidgetHelpers.setHelp(textUserId, SystemPlugin.HELPPREFIX + "ccon0005"); + SystemWidgetHelpers.setHelp(textUserId, RSEUIPlugin.HELPPREFIX + "ccon0005"); } // DESCRIPTION PROMPT @@ -727,7 +730,7 @@ public class SystemConnectionForm labelDescription.setToolTipText(SystemResources.RESID_CONNECTION_DESCRIPTION_TIP); textDescription = SystemWidgetHelpers.createTextField( composite_prompts,null,SystemResources.RESID_CONNECTION_DESCRIPTION_TIP); - SystemWidgetHelpers.setHelp(textDescription, SystemPlugin.HELPPREFIX + "ccon0006"); + SystemWidgetHelpers.setHelp(textDescription, RSEUIPlugin.HELPPREFIX + "ccon0006"); // VERIFY HOST NAME CHECKBOX SystemWidgetHelpers.createLabel(composite_prompts, " ", nbrColumns); // filler @@ -741,7 +744,7 @@ public class SystemConnectionForm if (enableOfflineCB()) { workOfflineCB = SystemWidgetHelpers.createCheckBox(composite_prompts, nbrColumns, null, SystemResources.RESID_OFFLINE_WORKOFFLINE_LABEL, SystemResources.RESID_OFFLINE_WORKOFFLINE_TOOLTIP); - SystemWidgetHelpers.setHelp(workOfflineCB, SystemPlugin.HELPPREFIX + "wofp0000"); + SystemWidgetHelpers.setHelp(workOfflineCB, RSEUIPlugin.HELPPREFIX + "wofp0000"); } if (!initDone) @@ -839,7 +842,7 @@ public class SystemConnectionForm String currHostName = textHostName.getText().trim(); boolean hostNameChanged = !currHostName.equals(originalHostName); String currSystemType = textSystemType.getText().trim(); - textHostName.setItems(SystemPlugin.getTheSystemRegistry().getHostNames(currSystemType)); + textHostName.setItems(RSEUIPlugin.getTheSystemRegistry().getHostNames(currSystemType)); if (hostNameChanged) { textHostName.setText(currHostName); @@ -873,7 +876,7 @@ public class SystemConnectionForm if (!verifyHostNameCB.getSelection()) { // clear host name not valid or not found error message so that wizard next page is enabled - if (errorMessage != null && errorMessage == SystemPlugin.getPluginMessage(MSG_HOSTNAME_NOTFOUND)) { + if (errorMessage != null && errorMessage == RSEUIPlugin.getPluginMessage(MSG_HOSTNAME_NOTFOUND)) { errorMessage = null; if (msgLine != null) { @@ -1161,7 +1164,7 @@ public class SystemConnectionForm if (hostValidator != null) errorMessage= hostValidator.validate(hostName); else if (getHostName().length() == 0) - errorMessage = SystemPlugin.getPluginMessage(MSG_VALIDATE_HOSTNAME_EMPTY); + errorMessage = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_HOSTNAME_EMPTY); if (updateMode && !userPickedVerifyHostnameCB) { boolean hostNameChanged = !hostName.equals(defaultHostName); @@ -1186,7 +1189,7 @@ public class SystemConnectionForm if (userIdValidator != null) errorMessage= userIdValidator.validate(textUserId.getText()); else if (getDefaultUserId().length()==0) - errorMessage = SystemPlugin.getPluginMessage(MSG_VALIDATE_USERID_EMPTY); + errorMessage = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_USERID_EMPTY); } showErrorMessage(errorMessage); setPageComplete(); @@ -1241,7 +1244,7 @@ public class SystemConnectionForm public static ISystemValidator getConnectionNameValidator(IHost conn) { ISystemProfile profile = conn.getSystemProfile(); - Vector v = SystemPlugin.getTheSystemRegistry().getHostAliasNames(profile); + Vector v = RSEUIPlugin.getTheSystemRegistry().getHostAliasNames(profile); if (conn != null) // hmm, line 1 of this method will crash if this is the case! v.removeElement(conn.getAliasName()); ValidatorConnectionName connNameValidator = new ValidatorConnectionName(v); @@ -1254,7 +1257,7 @@ public class SystemConnectionForm */ public static ISystemValidator getConnectionNameValidator(ISystemProfile profile) { - Vector v = SystemPlugin.getTheSystemRegistry().getHostAliasNames(profile); + Vector v = RSEUIPlugin.getTheSystemRegistry().getHostAliasNames(profile); ValidatorConnectionName connNameValidator = new ValidatorConnectionName(v); return connNameValidator; } @@ -1265,7 +1268,7 @@ public class SystemConnectionForm */ public static ISystemValidator[] getConnectionNameValidators() { - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); ISystemProfile[] profiles = sr.getActiveSystemProfiles(); ISystemValidator[] connNameValidators = new ISystemValidator[profiles.length]; for (int idx=0; idx include "local" + String[] typeItems = ((systemTypes == null) ? RSECorePlugin.getDefault().getRegistry().getSystemTypeNames() : systemTypes); combo.setItems(typeItems); combo.select(0); @@ -1089,7 +1089,7 @@ public class SystemWidgetHelpers { //System.out.println("TipId: " + ISystemConstants.RESID_HOSTNAME_TIP); Combo combo = createCombo(parent, listener, SystemResources.RESID_CONNECTION_HOSTNAME_TIP); //System.out.println("Tip : " + combo.getToolTipText()); - combo.setItems(SystemPlugin.getTheSystemRegistry().getHostNames(systemType)); + combo.setItems(RSEUIPlugin.getTheSystemRegistry().getHostNames(systemType)); combo.select(0); return combo; } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayHidableSystemMessageAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayHidableSystemMessageAction.java new file mode 100644 index 00000000000..be1c441a05c --- /dev/null +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayHidableSystemMessageAction.java @@ -0,0 +1,47 @@ +/******************************************************************************** + * 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: + * Michael Berger (IBM) - Initial API and implementation + ********************************************************************************/ +package org.eclipse.rse.ui.actions; + +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.rse.services.clientserver.messages.SystemMessage; +import org.eclipse.rse.ui.messages.SystemMessageDialog; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; + +public class DisplayHidableSystemMessageAction extends + DisplaySystemMessageAction +{ + protected IPreferenceStore _store; + protected String _prefID; + public DisplayHidableSystemMessageAction(SystemMessage message, IPreferenceStore prefStore, String prefID) + { + super(message); + _store = prefStore; + _prefID = prefID; + } + + /** + * @see Runnable#run() + */ + public void run() { + boolean finished = false; + + Shell[] shells = Display.getCurrent().getShells(); + for (int loop = 0; loop < shells.length && !finished; loop++) { + if (shells[loop].isEnabled() && shells[loop].isVisible()) { + SystemMessageDialog dialog = new SystemMessageDialog(shells[loop], message); + dialog.setNoShowAgainOption(true, _store, _prefID, false); + dialog.openQuestionNoException(); + rc = dialog.getButtonPressedId(); + finished = true; + } + } + } +} diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplaySystemMessageAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplaySystemMessageAction.java index b777be31142..e1d54fc8d08 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplaySystemMessageAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplaySystemMessageAction.java @@ -29,8 +29,8 @@ import org.eclipse.swt.widgets.Shell; public class DisplaySystemMessageAction implements Runnable { - private SystemMessage message; - private int rc; + protected SystemMessage message; + protected int rc; public DisplaySystemMessageAction(SystemMessage message) { this.message = message; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemDynamicPopupMenuExtension.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemDynamicPopupMenuExtension.java index fb197d33fdc..3193c018918 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemDynamicPopupMenuExtension.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemDynamicPopupMenuExtension.java @@ -15,8 +15,8 @@ ********************************************************************************/ package org.eclipse.rse.ui.actions; -import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.rse.ui.SystemMenuManager; import org.eclipse.swt.widgets.Shell; /** @@ -40,5 +40,5 @@ public interface ISystemDynamicPopupMenuExtension * @param selection the resources to contriubte menu items to * */ - public void populateMenu(Shell shell, IMenuManager menu, IStructuredSelection selection, String menuGroup); + public void populateMenu(Shell shell, SystemMenuManager menu, IStructuredSelection selection, String menuGroup); } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseCopyAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseCopyAction.java index 0a1b55b9884..c516e25055c 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseCopyAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseCopyAction.java @@ -21,7 +21,6 @@ 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.SystemPlugin; import org.eclipse.rse.internal.model.SystemProfileManager; import org.eclipse.rse.model.ISystemProfileManager; import org.eclipse.rse.model.ISystemRegistry; @@ -30,6 +29,7 @@ import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement; import org.eclipse.rse.ui.dialogs.SystemSimpleCopyDialog; @@ -87,12 +87,12 @@ public abstract class SystemBaseCopyAction extends SystemBaseDialogAction super(label, (mode==MODE_COPY ? PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY) - //SystemPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_COPY_ID) - : SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVE_ID)), + //RSEUIPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_COPY_ID) + : RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVE_ID)), parent); this.mode = mode; mgr = SystemProfileManager.getSystemProfileManager(); - sr = SystemPlugin.getTheSystemRegistry(); + sr = RSEUIPlugin.getTheSystemRegistry(); allowOnMultipleSelection(true); setProcessAllSelections(true); setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE); @@ -217,7 +217,7 @@ public abstract class SystemBaseCopyAction extends SystemBaseDialogAction */ protected IRunnableContext getRunnableContext() { - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); IRunnableContext irc = sr.getRunnableContext(); if (irc == null) irc = new ProgressMonitorDialog(getShell()); @@ -342,9 +342,9 @@ public abstract class SystemBaseCopyAction extends SystemBaseDialogAction protected SystemMessage getCopyingMessage() { if (mode == MODE_COPY) - return SystemPlugin.getPluginMessage(MSG_COPYGENERIC_PROGRESS); + return RSEUIPlugin.getPluginMessage(MSG_COPYGENERIC_PROGRESS); else - return SystemPlugin.getPluginMessage(MSG_MOVEGENERIC_PROGRESS); + return RSEUIPlugin.getPluginMessage(MSG_MOVEGENERIC_PROGRESS); } /** * Get the specific "Copying %1..." or "Moving %1..." message @@ -353,9 +353,9 @@ public abstract class SystemBaseCopyAction extends SystemBaseDialogAction { SystemMessage msg = null; if (mode == MODE_COPY) - msg = SystemPlugin.getPluginMessage(MSG_COPYTHINGGENERIC_PROGRESS); + msg = RSEUIPlugin.getPluginMessage(MSG_COPYTHINGGENERIC_PROGRESS); else - msg = SystemPlugin.getPluginMessage(MSG_MOVETHINGGENERIC_PROGRESS); + msg = RSEUIPlugin.getPluginMessage(MSG_MOVETHINGGENERIC_PROGRESS); msg.makeSubstitution(oldName); return msg; } @@ -404,10 +404,10 @@ public abstract class SystemBaseCopyAction extends SystemBaseDialogAction msg = exc.getClass().getName(); SystemMessageDialog msgDlg = new SystemMessageDialog(shell, - SystemPlugin.getPluginMessage(MSG_OPERATION_FAILED).makeSubstitution(msg)); + RSEUIPlugin.getPluginMessage(MSG_OPERATION_FAILED).makeSubstitution(msg)); msgDlg.setException(exc); msgDlg.open(); - //SystemPlugin.logError("Copy/Move operation failed",exc); + //RSEUIPlugin.logError("Copy/Move operation failed",exc); } } /** @@ -421,7 +421,7 @@ public abstract class SystemBaseCopyAction extends SystemBaseDialogAction SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg); msgDlg.open(); - //SystemPlugin.logError("Copy/Move operation failed",exc); + //RSEUIPlugin.logError("Copy/Move operation failed",exc); } /** @@ -431,7 +431,7 @@ public abstract class SystemBaseCopyAction extends SystemBaseDialogAction */ protected void showOperationCancelledMessage(Shell shell) { - SystemMessageDialog msgDlg = new SystemMessageDialog(shell, SystemPlugin.getPluginMessage(MSG_OPERATION_CANCELLED)); + SystemMessageDialog msgDlg = new SystemMessageDialog(shell, RSEUIPlugin.getPluginMessage(MSG_OPERATION_CANCELLED)); msgDlg.open(); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingPreferencesAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingPreferencesAction.java index 604b3a11940..930b1bed2c3 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingPreferencesAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCascadingPreferencesAction.java @@ -18,8 +18,8 @@ package org.eclipse.rse.ui.actions; import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.Separator; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemContextMenuConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.swt.widgets.Shell; @@ -44,7 +44,7 @@ public class SystemCascadingPreferencesAction setPopulateMenuEachTime(false); setSelectionSensitive(false); - setHelp(SystemPlugin.HELPPREFIX+"actnpref"); + setHelp(RSEUIPlugin.HELPPREFIX+"actnpref"); } /** @@ -71,7 +71,7 @@ public class SystemCascadingPreferencesAction //System.out.println("In menuAboutToShow!"); setBusyCursor(true); ourSubMenu.add(new Separator(ISystemContextMenuConstants.GROUP_ADDITIONS)); // user or BP/ISV additions - SystemShowPreferencesPageAction[] prefPageActions = SystemPlugin.getDefault().getShowPreferencePageActions(); + SystemShowPreferencesPageAction[] prefPageActions = RSEUIPlugin.getDefault().getShowPreferencePageActions(); if (prefPageActions!=null) { for (int idx=0; idx" - */ -public class SystemCascadingUserIdPerSystemTypeAction - extends SystemBaseSubMenuAction - implements IMenuListener -{ - - /** - * Constructor - */ - public SystemCascadingUserIdPerSystemTypeAction(Shell shell) - { - super(SystemResources.ACTION_CASCADING_USERID_LABEL, SystemResources.ACTION_CASCADING_USERID_TOOLTIP, shell); - setCreateMenuEachTime(false); - setPopulateMenuEachTime(false); - setSelectionSensitive(false); - - setHelp(SystemPlugin.HELPPREFIX+"actn0010"); - } - - /** - * @see SystemBaseSubMenuAction#getSubMenu() - */ - public IMenuManager populateSubMenu(IMenuManager menu) - { - menu.addMenuListener(this); - menu.setRemoveAllWhenShown(true); - //menu.setEnabled(true); - menu.add(new SystemBaseAction("dummy",null)); - return menu; - } - - /** - * Called when submenu is about to show - */ - public void menuAboutToShow(IMenuManager ourSubMenu) - { - SystemType[] types = SystemPlugin.getTheSystemTypes(SystemPlugin.INCLUDE_LOCAL_NO); // false => do not include local - for (int idx=0; idx Profile" @@ -51,13 +51,13 @@ public class SystemNewProfileAction extends SystemBaseWizardAction { super(cascading ? SystemResources.ACTION_NEWPROFILE_LABEL : SystemResources.ACTION_NEW_PROFILE_LABEL, cascading ? SystemResources.ACTION_NEWPROFILE_TOOLTIP : SystemResources.ACTION_NEW_PROFILE_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWPROFILE_ID), parent); + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWPROFILE_ID), parent); setSelectionSensitive(false); if (cascading) setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW); else setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW_NONCASCADING); - setHelp(SystemPlugin.HELPPREFIX+"actn0003"); + setHelp(RSEUIPlugin.HELPPREFIX+"actn0003"); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemOpenExplorerPerspectiveAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemOpenExplorerPerspectiveAction.java index b38427b8713..01f5a282bd4 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemOpenExplorerPerspectiveAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemOpenExplorerPerspectiveAction.java @@ -18,11 +18,11 @@ package org.eclipse.rse.ui.actions; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.jface.action.Action; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.filters.ISystemFilterReference; import org.eclipse.rse.model.ISystemPromptableObject; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.view.SystemPerspectiveLayout; import org.eclipse.swt.widgets.Shell; @@ -52,7 +52,7 @@ public class SystemOpenExplorerPerspectiveAction public SystemOpenExplorerPerspectiveAction(Shell parent, IWorkbenchWindow currentWorkbenchWindow) { super(SystemResources.ACTION_OPENEXPLORER_DIFFPERSP2_LABEL, SystemResources.ACTION_OPENEXPLORER_DIFFPERSP2_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PERSPECTIVE_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PERSPECTIVE_ID), parent); this.window = currentWorkbenchWindow; this.reg = PlatformUI.getWorkbench().getPerspectiveRegistry(); @@ -60,7 +60,7 @@ public class SystemOpenExplorerPerspectiveAction allowOnMultipleSelection(false); setContextMenuGroup(ISystemContextMenuConstants.GROUP_OPEN); - setHelp(SystemPlugin.HELPPREFIX+"actn0016"); + setHelp(RSEUIPlugin.HELPPREFIX+"actn0016"); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPasteFromClipboardAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPasteFromClipboardAction.java index bfb0c22eac5..a7d12f8fe09 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPasteFromClipboardAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPasteFromClipboardAction.java @@ -26,12 +26,12 @@ import org.eclipse.core.runtime.jobs.MultiRule; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.model.IHost; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.validators.IValidatorRemoteSelection; import org.eclipse.rse.ui.view.ISystemDragDropAdapter; @@ -65,7 +65,7 @@ public class SystemPasteFromClipboardAction extends SystemBaseAction implements { super(SystemResources.ACTION_PASTE_LABEL, PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_PASTE), - //SystemPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_PASTE_ID), + //RSEUIPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_PASTE_ID), shell); _clipboard = clipboard; _srcType = SystemDNDTransferRunnable.SRC_TYPE_RSE_RESOURCE; @@ -73,7 +73,7 @@ public class SystemPasteFromClipboardAction extends SystemBaseAction implements allowOnMultipleSelection(false); setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE); - setHelp(SystemPlugin.HELPPREFIX + "actn0117"); + setHelp(RSEUIPlugin.HELPPREFIX + "actn0117"); } public void run() @@ -87,7 +87,7 @@ public class SystemPasteFromClipboardAction extends SystemBaseAction implements private void pasteClipboardToSelection(Object target) { - List srcObjects = SystemPlugin.getTheSystemRegistry().getSystemClipboardObjects(_srcType); + List srcObjects = RSEUIPlugin.getTheSystemRegistry().getSystemClipboardObjects(_srcType); if (srcObjects.size() > 0) { // do the transfer @@ -137,7 +137,7 @@ public class SystemPasteFromClipboardAction extends SystemBaseAction implements } } runnable.schedule(); - SystemPlugin.getTheSystemRegistry().clearRunnableContext(); + RSEUIPlugin.getTheSystemRegistry().clearRunnableContext(); } // clear clipboard // _clipboard.setContents(new Object[] { null }, new Transfer[] { PluginTransfer.getInstance()}); @@ -314,7 +314,7 @@ public class SystemPasteFromClipboardAction extends SystemBaseAction implements protected IRunnableContext getRunnableContext(Shell shell) { - IRunnableContext irc = SystemPlugin.getTheSystemRegistry().getRunnableContext(); + IRunnableContext irc = RSEUIPlugin.getTheSystemRegistry().getRunnableContext(); if (irc != null) { return irc; @@ -323,13 +323,13 @@ public class SystemPasteFromClipboardAction extends SystemBaseAction implements { /* // for other cases, use statusbar - IWorkbenchWindow win = SystemPlugin.getActiveWorkbenchWindow(); + IWorkbenchWindow win = RSEUIPlugin.getActiveWorkbenchWindow(); if (win != null) { - Shell winShell = SystemPlugin.getActiveWorkbenchShell(); + Shell winShell = RSEUIPlugin.getActiveWorkbenchShell(); if (winShell != null && !winShell.isDisposed() && winShell.isVisible()) { - SystemPlugin.logInfo("Using active workbench window as runnable context"); + RSEUIPlugin.logInfo("Using active workbench window as runnable context"); shell = winShell; return win; } @@ -341,7 +341,7 @@ public class SystemPasteFromClipboardAction extends SystemBaseAction implements */ irc = new ProgressMonitorDialog(shell); - SystemPlugin.getTheSystemRegistry().setRunnableContext(shell, irc); + RSEUIPlugin.getTheSystemRegistry().setRunnableContext(shell, irc); return irc; } } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceQualifyConnectionNamesAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceQualifyConnectionNamesAction.java index 2b023ae3066..51ed262ec47 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceQualifyConnectionNamesAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceQualifyConnectionNamesAction.java @@ -15,10 +15,10 @@ ********************************************************************************/ package org.eclipse.rse.ui.actions; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.internal.model.SystemPreferenceChangeEvent; import org.eclipse.rse.model.ISystemPreferenceChangeEvents; import org.eclipse.rse.model.ISystemRegistry; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.swt.widgets.Shell; @@ -41,10 +41,10 @@ public class SystemPreferenceQualifyConnectionNamesAction extends SystemBaseActi parent); setSelectionSensitive(false); allowOnMultipleSelection(true); - sr = SystemPlugin.getTheSystemRegistry(); + sr = RSEUIPlugin.getTheSystemRegistry(); setChecked(sr.getQualifiedHostNames()); - setHelp(SystemPlugin.HELPPREFIX+"actn0008"); + setHelp(RSEUIPlugin.HELPPREFIX+"actn0008"); } /** @@ -64,7 +64,7 @@ public class SystemPreferenceQualifyConnectionNamesAction extends SystemBaseActi */ private void firePreferenceChangeEvent(int type, boolean oldValue, boolean newValue) { - SystemPlugin.getDefault().getSystemRegistry().fireEvent( + RSEUIPlugin.getDefault().getSystemRegistry().fireEvent( new SystemPreferenceChangeEvent(type, oldValue ? Boolean.TRUE : Boolean.FALSE, newValue ? Boolean.TRUE : Boolean.FALSE)); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceRestoreStateAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceRestoreStateAction.java index dd81600c206..129b7d09ec7 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceRestoreStateAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceRestoreStateAction.java @@ -15,11 +15,11 @@ ********************************************************************************/ package org.eclipse.rse.ui.actions; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemPreferencesManager; import org.eclipse.rse.internal.model.SystemPreferenceChangeEvent; import org.eclipse.rse.model.ISystemPreferenceChangeEvents; import org.eclipse.rse.model.ISystemRegistry; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.swt.widgets.Shell; @@ -41,10 +41,10 @@ public class SystemPreferenceRestoreStateAction extends SystemBaseAction super(SystemResources.ACTION_RESTORE_STATE_PREFERENCE_LABEL,SystemResources.ACTION_RESTORE_STATE_PREFERENCE_TOOLTIP, parent); setSelectionSensitive(false); allowOnMultipleSelection(true); - sr = SystemPlugin.getTheSystemRegistry(); + sr = RSEUIPlugin.getTheSystemRegistry(); setChecked(SystemPreferencesManager.getPreferencesManager().getRememberState()); - setHelp(SystemPlugin.HELPPREFIX+"aprefres"); + setHelp(RSEUIPlugin.HELPPREFIX+"aprefres"); } /** @@ -64,7 +64,7 @@ public class SystemPreferenceRestoreStateAction extends SystemBaseAction */ private void firePreferenceChangeEvent(int type, boolean oldValue, boolean newValue) { - SystemPlugin.getDefault().getSystemRegistry().fireEvent( + RSEUIPlugin.getDefault().getSystemRegistry().fireEvent( new SystemPreferenceChangeEvent(type, oldValue ? Boolean.TRUE : Boolean.FALSE, newValue ? Boolean.TRUE : Boolean.FALSE)); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceShowFilterPoolsAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceShowFilterPoolsAction.java index d2fda542ee9..646feff6b7a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceShowFilterPoolsAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceShowFilterPoolsAction.java @@ -15,10 +15,10 @@ ********************************************************************************/ package org.eclipse.rse.ui.actions; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemPreferencesManager; import org.eclipse.rse.internal.model.SystemPreferenceChangeEvent; import org.eclipse.rse.model.ISystemPreferenceChangeEvents; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.swt.widgets.Shell; @@ -43,7 +43,7 @@ public class SystemPreferenceShowFilterPoolsAction extends SystemBaseAction setChecked(SystemPreferencesManager.getPreferencesManager().getShowFilterPools()); setSelectionSensitive(false); - setHelp(SystemPlugin.HELPPREFIX+"actn0011"); + setHelp(RSEUIPlugin.HELPPREFIX+"actn0011"); } /** @@ -63,7 +63,7 @@ public class SystemPreferenceShowFilterPoolsAction extends SystemBaseAction */ private void firePreferenceChangeEvent(int type, boolean oldValue, boolean newValue) { - SystemPlugin.getDefault().getSystemRegistry().fireEvent( + RSEUIPlugin.getDefault().getSystemRegistry().fireEvent( new SystemPreferenceChangeEvent(type, oldValue ? Boolean.TRUE : Boolean.FALSE, newValue ? Boolean.TRUE : Boolean.FALSE)); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceUserIdPerSystemTypeAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceUserIdPerSystemTypeAction.java deleted file mode 100644 index bfb71676b94..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceUserIdPerSystemTypeAction.java +++ /dev/null @@ -1,83 +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.ui.actions; -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; -import org.eclipse.rse.core.SystemPreferencesManager; -import org.eclipse.rse.core.SystemType; -import org.eclipse.rse.model.ISystemResourceChangeEvents; -import org.eclipse.rse.ui.dialogs.SystemUserIdPerSystemTypeDialog; -import org.eclipse.swt.widgets.Shell; - - -/** - * A selectable system type overall default userId action. - */ -public class SystemPreferenceUserIdPerSystemTypeAction extends SystemBaseDialogAction - -{ - - private SystemType systemType; - - /** - * Constructor - */ - public SystemPreferenceUserIdPerSystemTypeAction(Shell parent, SystemType systemType) - { - super(systemType.getName()+"...",null,parent); - this.systemType = systemType; - setSelectionSensitive(false); - - setHelp(SystemPlugin.HELPPREFIX+"actn0010"); - } - - /** - * @see SystemBaseAction#updateSelection(IStructuredSelection) - */ - public boolean updateSelection(IStructuredSelection selection) - { - boolean enable = true; - return enable; - } - - /* - * Override of parent - * @see #run() - */ - protected Dialog createDialog(Shell parent) - { - return new SystemUserIdPerSystemTypeDialog(parent, systemType); - } - - /** - * Required by parent. We use it to return the userId. Note the actual update is done! - */ - protected Object getDialogValue(Dialog dlg) - { - String userId = null; - SystemUserIdPerSystemTypeDialog uidDlg = (SystemUserIdPerSystemTypeDialog)dlg; - if (!uidDlg.wasCancelled()) - { - userId = uidDlg.getUserId(); - SystemPreferencesManager.getPreferencesManager().setDefaultUserId(systemType.getName(), userId); - SystemPlugin.getTheSystemRegistry().fireEvent(ISystemResourceChangeEvents.PROPERTYSHEET_UPDATE_EVENT); - } - return userId; - } - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemProfileNameCopyAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemProfileNameCopyAction.java index f5b1b462140..8ae7b82bd7b 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemProfileNameCopyAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemProfileNameCopyAction.java @@ -21,7 +21,6 @@ import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.internal.model.SystemProfileManager; import org.eclipse.rse.model.IHost; import org.eclipse.rse.model.ISystemProfile; @@ -29,6 +28,7 @@ import org.eclipse.rse.model.ISystemProfileManager; import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.dialogs.SystemCopyProfileDialog; import org.eclipse.rse.ui.messages.SystemMessageDialog; @@ -64,10 +64,10 @@ public class SystemProfileNameCopyAction extends SystemBaseDialogAction PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY), shell); mgr = SystemProfileManager.getSystemProfileManager(); - sr = SystemPlugin.getTheSystemRegistry(); + sr = RSEUIPlugin.getTheSystemRegistry(); setSelectionSensitive(true); allowOnMultipleSelection(false); - setHelp(SystemPlugin.HELPPREFIX+"actndupr"); + setHelp(RSEUIPlugin.HELPPREFIX+"actndupr"); } /** @@ -125,7 +125,7 @@ public class SystemProfileNameCopyAction extends SystemBaseDialogAction */ protected IRunnableContext getRunnableContext() { - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); IRunnableContext irc = sr.getRunnableContext(); if (irc == null) irc = new ProgressMonitorDialog(getShell()); @@ -180,7 +180,7 @@ public class SystemProfileNameCopyAction extends SystemBaseDialogAction */ public static String getCopyingMessage(String oldName, String newName) { - SystemMessage msg = SystemPlugin.getPluginMessage(MSG_COPY_PROGRESS); + SystemMessage msg = RSEUIPlugin.getPluginMessage(MSG_COPY_PROGRESS); msg.makeSubstitution(oldName,newName); return msg.getLevelOneText(); } @@ -205,7 +205,7 @@ public class SystemProfileNameCopyAction extends SystemBaseDialogAction */ protected void showOperationErrorMessage(Shell shell, Throwable exc) { - SystemMessageDialog msgDlg = new SystemMessageDialog(shell, SystemPlugin.getPluginMessage(MSG_OPERATION_FAILED).makeSubstitution(exc.getMessage())); + SystemMessageDialog msgDlg = new SystemMessageDialog(shell, RSEUIPlugin.getPluginMessage(MSG_OPERATION_FAILED).makeSubstitution(exc.getMessage())); msgDlg.open(); SystemBasePlugin.logError("Copy profile operation failed",exc); } @@ -216,7 +216,7 @@ public class SystemProfileNameCopyAction extends SystemBaseDialogAction */ protected void showOperationCancelledMessage(Shell shell) { - SystemMessageDialog msgDlg = new SystemMessageDialog(shell, SystemPlugin.getPluginMessage(MSG_OPERATION_CANCELLED)); + SystemMessageDialog msgDlg = new SystemMessageDialog(shell, RSEUIPlugin.getPluginMessage(MSG_OPERATION_CANCELLED)); msgDlg.open(); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemProfileNameSelectAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemProfileNameSelectAction.java index 0689c23cfc0..fb06777741a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemProfileNameSelectAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemProfileNameSelectAction.java @@ -15,11 +15,11 @@ ********************************************************************************/ package org.eclipse.rse.ui.actions; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.internal.model.SystemProfileManager; import org.eclipse.rse.model.ISystemProfile; import org.eclipse.rse.model.ISystemProfileManager; import org.eclipse.rse.model.ISystemRegistry; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.widgets.Shell; @@ -43,7 +43,7 @@ public class SystemProfileNameSelectAction extends SystemBaseAction setChecked(mgr.isSystemProfileActive(profile.getName())); setSelectionSensitive(false); - setHelp(SystemPlugin.HELPPREFIX+"actn0004"); + setHelp(RSEUIPlugin.HELPPREFIX+"actn0004"); } @@ -53,7 +53,7 @@ public class SystemProfileNameSelectAction extends SystemBaseAction */ public void run() { - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); sr.setSystemProfileActive(profile, isChecked()); } } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAction.java index d7239eeeba4..334d4047f48 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAction.java @@ -18,7 +18,6 @@ package org.eclipse.rse.ui.actions; import java.util.Iterator; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.ISystemContainer; import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemResourceChangeEvents; @@ -26,6 +25,7 @@ import org.eclipse.rse.model.ISystemResourceChangeListener; import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.swt.widgets.Shell; @@ -44,11 +44,11 @@ public class SystemRefreshAction extends SystemBaseAction public SystemRefreshAction(Shell parent) { super(SystemResources.ACTION_REFRESH_LABEL, SystemResources.ACTION_REFRESH_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptorFromIDE(ISystemIconConstants.ICON_IDE_REFRESH_ID), // D54577 + RSEUIPlugin.getDefault().getImageDescriptorFromIDE(ISystemIconConstants.ICON_IDE_REFRESH_ID), // D54577 parent); allowOnMultipleSelection(true); setContextMenuGroup(ISystemContextMenuConstants.GROUP_BUILD); - setHelp(SystemPlugin.HELPPREFIX+"actn0017"); + setHelp(RSEUIPlugin.HELPPREFIX+"actn0017"); setAvailableOffline(true); } @@ -68,7 +68,7 @@ public class SystemRefreshAction extends SystemBaseAction */ public void run() { - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); if (_selection != null) { Iterator iter = _selection.iterator(); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAllAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAllAction.java index 549bce06e49..915c28814e0 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAllAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAllAction.java @@ -18,12 +18,12 @@ package org.eclipse.rse.ui.actions; import java.util.Iterator; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.ISystemContainer; import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemResourceChangeEvents; import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.ui.ISystemContextMenuConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.swt.widgets.Shell; @@ -51,7 +51,7 @@ public class SystemRefreshAllAction extends SystemBaseAction //setSelectionSensitive(false); setSelectionSensitive(true);// use selection to decide what to invalidate - setHelp(SystemPlugin.HELPPREFIX+"actn0009"); + setHelp(RSEUIPlugin.HELPPREFIX+"actn0009"); } public void setRootObject(Object object) @@ -96,7 +96,7 @@ public class SystemRefreshAllAction extends SystemBaseAction ((ISystemContainer)_rootObject).markStale(true); } } - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); sr.fireEvent(new SystemResourceChangeEvent(sr, ISystemResourceChangeEvents.EVENT_REFRESH, null)); } } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRemoteServerStartAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRemoteServerStartAction.java index ddbf08c7bbb..15a98c49a29 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRemoteServerStartAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRemoteServerStartAction.java @@ -16,8 +16,8 @@ package org.eclipse.rse.ui.actions; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.swt.widgets.Shell; @@ -44,7 +44,7 @@ public class SystemRemoteServerStartAction extends SystemBaseAction this.parentAction = parentAction; allowOnMultipleSelection(false); //setContextMenuGroup(ISystemContextMenuConstants.GROUP_CONNECTION); - setHelp(SystemPlugin.HELPPREFIX+"actnstsv"); + setHelp(RSEUIPlugin.HELPPREFIX+"actnstsv"); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRemoteServerStopAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRemoteServerStopAction.java index 5d6a5ac289d..ff54bec7c53 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRemoteServerStopAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRemoteServerStopAction.java @@ -16,8 +16,8 @@ package org.eclipse.rse.ui.actions; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.swt.widgets.Shell; @@ -44,7 +44,7 @@ public class SystemRemoteServerStopAction extends SystemBaseAction this.parentAction = parentAction; allowOnMultipleSelection(false); //setContextMenuGroup(ISystemContextMenuConstants.GROUP_CONNECTION); - setHelp(SystemPlugin.HELPPREFIX+"actnspsv"); + setHelp(RSEUIPlugin.HELPPREFIX+"actnspsv"); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRunAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRunAction.java index 5616d8ca22d..8ff90b17991 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRunAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRunAction.java @@ -17,9 +17,9 @@ package org.eclipse.rse.ui.actions; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.view.ISystemViewRunnableObject; import org.eclipse.swt.widgets.Shell; @@ -39,7 +39,7 @@ public class SystemRunAction extends SystemBaseAction public SystemRunAction(Shell shell) { this(SystemResources.ACTION_RUN_LABEL, SystemResources.ACTION_RUN_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_RUN_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_RUN_ID), shell); } @@ -63,7 +63,7 @@ public class SystemRunAction extends SystemBaseAction protected void init() { allowOnMultipleSelection(false); setContextMenuGroup(ISystemContextMenuConstants.GROUP_OPEN); - setHelp(SystemPlugin.HELPPREFIX+"actn0100"); + setHelp(RSEUIPlugin.HELPPREFIX+"actn0100"); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemSelectConnectionAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemSelectConnectionAction.java index 6ef2efb2cc4..d5543444022 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemSelectConnectionAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemSelectConnectionAction.java @@ -58,7 +58,7 @@ public class SystemSelectConnectionAction extends SystemBaseDialogAction * Restrict to certain system types * @param systemTypes the system types to restrict what connections are shown and what types of connections * the user can create - * @see org.eclipse.rse.core.ISystemTypes + * @see org.eclipse.rse.core.IRSESystemType */ public void setSystemTypes(String[] systemTypes) { @@ -68,7 +68,7 @@ public class SystemSelectConnectionAction extends SystemBaseDialogAction * Restrict to a certain system type * @param systemType the system type to restrict what connections are shown and what types of connections * the user can create - * @see org.eclipse.rse.core.ISystemTypes + * @see org.eclipse.rse.core.IRSESystemType */ public void setSystemType(String systemType) { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemShowInMonitorAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemShowInMonitorAction.java index cc94dfe5fc4..feb1cf73a9a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemShowInMonitorAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemShowInMonitorAction.java @@ -20,8 +20,8 @@ import java.util.Iterator; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.view.ISystemViewElementAdapter; import org.eclipse.rse.ui.view.monitor.SystemMonitorUI; @@ -48,7 +48,7 @@ public class SystemShowInMonitorAction extends SystemBaseAction { super(SystemResources.ACTION_MONITOR_LABEL, SystemResources.ACTION_MONITOR_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SHOW_MONITOR_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SHOW_MONITOR_ID), parent); setAvailableOffline(true); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemShowInTableAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemShowInTableAction.java index 0061a4d88d9..84d1afb7b30 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemShowInTableAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemShowInTableAction.java @@ -20,8 +20,8 @@ import java.util.Iterator; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.view.ISystemViewElementAdapter; import org.eclipse.rse.ui.view.SystemTableViewPart; @@ -47,7 +47,7 @@ public class SystemShowInTableAction extends SystemBaseAction { super(SystemResources.ACTION_TABLE_LABEL, SystemResources.ACTION_TABLE_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SHOW_TABLE_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SHOW_TABLE_ID), parent); setAvailableOffline(true); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemShowPreferencesPageAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemShowPreferencesPageAction.java index 40784f1b33e..02bdef17786 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemShowPreferencesPageAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemShowPreferencesPageAction.java @@ -25,7 +25,7 @@ import org.eclipse.jface.preference.IPreferenceNode; import org.eclipse.jface.preference.PreferenceDialog; import org.eclipse.jface.preference.PreferenceManager; import org.eclipse.jface.viewers.ISelection; -import org.eclipse.rse.core.SystemPlugin; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.ui.IActionDelegate; import org.eclipse.ui.IViewActionDelegate; import org.eclipse.ui.IViewPart; @@ -51,7 +51,7 @@ public class SystemShowPreferencesPageAction extends SystemBaseAction implements private String preferencePageCategory; /** - * Constructor. We are instantiated inside {@link SystemPlugin#getPreferencePageActionPlugins()} + * Constructor. We are instantiated inside {@link RSEUIPlugin#getPreferencePageActionPlugins()} * for each extension of our extension point org.eclipse.rse.core.remoteSystemsViewPreferencesActions */ public SystemShowPreferencesPageAction() diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemStartCommunicationsDaemonAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemStartCommunicationsDaemonAction.java index a2b01bf7794..6683c51376b 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemStartCommunicationsDaemonAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemStartCommunicationsDaemonAction.java @@ -17,8 +17,8 @@ package org.eclipse.rse.ui.actions; import org.eclipse.jface.action.IAction; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.comm.SystemCommunicationsDaemon; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.swt.widgets.Shell; @@ -40,7 +40,7 @@ public class SystemStartCommunicationsDaemonAction extends SystemBaseAction impl SystemResources.ACTION_DAEMON_STOP_TOOLTIP, shell); - setHelp(SystemPlugin.HELPPREFIX + "dmna0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "dmna0000"); if (!SystemCommunicationsDaemon.isAutoStart() || !SystemCommunicationsDaemon.getInstance().isRunning()) { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemTeamReloadAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemTeamReloadAction.java index 6d0b30470b3..a392b8420a1 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemTeamReloadAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemTeamReloadAction.java @@ -16,11 +16,11 @@ package org.eclipse.rse.ui.actions; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemResourceListener; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.swt.widgets.Shell; @@ -47,7 +47,7 @@ public class SystemTeamReloadAction extends SystemBaseAction allowOnMultipleSelection(false); setContextMenuGroup(ISystemContextMenuConstants.GROUP_BUILD); //setSelectionSensitive(false); - setHelp(SystemPlugin.HELPPREFIX+"actn0009"); + setHelp(RSEUIPlugin.HELPPREFIX+"actn0009"); } /** @@ -64,8 +64,8 @@ public class SystemTeamReloadAction extends SystemBaseAction */ public void run() { - //SystemRegistry sr = SystemPlugin.getTheSystemRegistry(); - SystemMessage confirmMsg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONFIRM_RELOADRSE); + //SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); + SystemMessage confirmMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONFIRM_RELOADRSE); SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), confirmMsg); boolean ok = msgDlg.openQuestionNoException(); if (ok) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemWorkOfflineAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemWorkOfflineAction.java index ad24aae6447..e6e1851c68b 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemWorkOfflineAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemWorkOfflineAction.java @@ -17,13 +17,13 @@ package org.eclipse.rse.ui.actions; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.ISystemTypes; +import org.eclipse.rse.core.IRSESystemType; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.model.IHost; import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.ui.ISystemContextMenuConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.swt.widgets.Shell; @@ -45,7 +45,7 @@ public class SystemWorkOfflineAction extends SystemBaseAction super(SystemResources.RESID_OFFLINE_WORKOFFLINE_LABEL, SystemResources.RESID_OFFLINE_WORKOFFLINE_TOOLTIP, shell); allowOnMultipleSelection(false); setContextMenuGroup(ISystemContextMenuConstants.GROUP_CONNECTION); - setHelp(SystemPlugin.HELPPREFIX+"wofa0000"); + setHelp(RSEUIPlugin.HELPPREFIX+"wofa0000"); } /** @@ -67,7 +67,7 @@ public class SystemWorkOfflineAction extends SystemBaseAction public void run() { IHost conn = (IHost)getFirstSelection(); - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); if (conn.isOffline()) { @@ -102,7 +102,7 @@ public class SystemWorkOfflineAction extends SystemBaseAction } // check that everything was disconnedted okay and this is not the local connection - if(sr.isAnySubSystemConnected(conn) && !ISystemTypes.SYSTEMTYPE_LOCAL.equals(conn.getSystemType())) + if(sr.isAnySubSystemConnected(conn) && !IRSESystemType.SYSTEMTYPE_LOCAL.equals(conn.getSystemType())) { // backout changes, likely because user cancelled the disconnect setChecked(false); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemWorkWithProfilesAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemWorkWithProfilesAction.java index 15d6a5580cd..fd045ff7440 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemWorkWithProfilesAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemWorkWithProfilesAction.java @@ -16,8 +16,8 @@ package org.eclipse.rse.ui.actions; import org.eclipse.rse.core.SystemPerspectiveHelpers; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.ISystemRegistry; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.view.team.SystemTeamViewPart; import org.eclipse.swt.widgets.Shell; @@ -40,8 +40,8 @@ public class SystemWorkWithProfilesAction extends SystemBaseAction super(SystemResources.ACTION_WORKWITH_PROFILES_LABEL, SystemResources.ACTION_WORKWITH_PROFILES_TOOLTIP, parent); setSelectionSensitive(false); allowOnMultipleSelection(true); - sr = SystemPlugin.getTheSystemRegistry(); - setHelp(SystemPlugin.HELPPREFIX+"actnwwpr"); + sr = RSEUIPlugin.getTheSystemRegistry(); + setHelp(RSEUIPlugin.HELPPREFIX+"actnwwpr"); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/EnvironmentVariablesPromptDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/EnvironmentVariablesPromptDialog.java index c0e4fbc4675..20ba341fa8b 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/EnvironmentVariablesPromptDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/EnvironmentVariablesPromptDialog.java @@ -16,9 +16,9 @@ package org.eclipse.rse.ui.dialogs; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.swt.events.ModifyEvent; @@ -98,9 +98,9 @@ public class EnvironmentVariablesPromptDialog extends SystemPromptDialog impleme } if (!change) - SystemWidgetHelpers.setCompositeHelp(parent, SystemPlugin.HELPPREFIX + "envv0001"); + SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "envv0001"); else - SystemWidgetHelpers.setCompositeHelp(parent, SystemPlugin.HELPPREFIX + "envv0002"); + SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "envv0002"); // Set name and value limits for known system types @@ -192,7 +192,7 @@ public class EnvironmentVariablesPromptDialog extends SystemPromptDialog impleme { if (nameStr.indexOf(invalidNameChars.charAt(i)) != -1) { - setErrorMessage(SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_INVALIDCHAR)); + setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_INVALIDCHAR)); nameTextField.setFocus(); return false; } @@ -208,7 +208,7 @@ public class EnvironmentVariablesPromptDialog extends SystemPromptDialog impleme { if (!change || !nameStr.equals(name)) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_DUPLICATE); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_DUPLICATE); msg.makeSubstitution(nameStr); setErrorMessage(msg); nameTextField.setFocus(); @@ -224,7 +224,7 @@ public class EnvironmentVariablesPromptDialog extends SystemPromptDialog impleme } else { - setErrorMessage(SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_NONAME)); + setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_NONAME)); nameTextField.setFocus(); return false; } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemChangePasswordDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemChangePasswordDialog.java new file mode 100644 index 00000000000..b025a7f8775 --- /dev/null +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemChangePasswordDialog.java @@ -0,0 +1,217 @@ +/******************************************************************************** + * 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.ui.dialogs; + +import org.eclipse.rse.services.clientserver.messages.SystemMessage; +import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; +import org.eclipse.rse.ui.SystemResources; +import org.eclipse.rse.ui.SystemWidgetHelpers; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Text; + +public class SystemChangePasswordDialog extends SystemPromptDialog +{ + private String _hostname; + private String _user; + private String _newPassword = ""; + + private Text _txtNewPassword; + private Text _txtConfirmPassword; + + private boolean savePassword = false; + protected Button _chkBoxSavePassword; + + private boolean newPasswordModified = false; + private boolean confirmModified = false; + + public SystemChangePasswordDialog(Shell shell, String hostname, String userid, SystemMessage msg) + { + super(shell, SystemResources.RESID_CHANGE_PASSWORD_TITLE, false); + _hostname = hostname; + _user = userid; + setErrorMessage(msg); + } + + /** + * @see SystemPromptDialog#getInitialFocusControl() + */ + protected Control getInitialFocusControl() { + return _txtNewPassword; + } + + /** + * @see SystemPromptDialog#createInner(Composite) + */ + protected Control createInner(Composite parent) { + + Label label = null; + Composite c = new Composite(parent, SWT.NONE); + + GridLayout layout = new GridLayout(); + layout.numColumns = 2; + c.setLayout(layout); + + // Host Name + label = new Label(c, SWT.NONE); + label.setText(SystemResources.RESID_PREF_SIGNON_HOSTNAME_LABEL); + + Text system = SystemWidgetHelpers.createTextField(c, null); + system.setText(_hostname); + system.setEditable(false); + system.setEnabled(false); + system.setToolTipText(SystemResources.RESID_PREF_SIGNON_HOSTNAME_TOOLTIP); + ((GridData) system.getLayoutData()).widthHint = 75; + + // User ID + label = new Label(c, SWT.NONE); + label.setText(SystemResources.RESID_PREF_SIGNON_USERID_LABEL); + + Text userID = SystemWidgetHelpers.createTextField(c, null); + userID.setText(_user); + userID.setEditable(false); + userID.setEnabled(false); + userID.setToolTipText(SystemResources.RESID_PREF_SIGNON_USERID_TOOLTIP); + ((GridData) userID.getLayoutData()).widthHint = 75; + + // New password + label = new Label(c, SWT.NONE); + label.setText(SystemResources.RESID_CHANGE_PASSWORD_NEW_LABEL); + _txtNewPassword = SystemWidgetHelpers.createTextField(c, null); + _txtNewPassword.setEchoChar('*'); + _txtNewPassword.setToolTipText(SystemResources.RESID_CHANGE_PASSWORD_NEW_TOOLTIP); + ((GridData) _txtNewPassword.getLayoutData()).widthHint = 75; + + // Confirm new password + label = new Label(c, SWT.NONE); + label.setText(SystemResources.RESID_CHANGE_PASSWORD_CONFIRM_LABEL); + _txtConfirmPassword = SystemWidgetHelpers.createTextField(c, null); + _txtConfirmPassword.setEchoChar('*'); + _txtConfirmPassword.setToolTipText(SystemResources.RESID_CHANGE_PASSWORD_CONFIRM_TOOLTIP); + ((GridData) _txtConfirmPassword.getLayoutData()).widthHint = 75; + + // Save signon information checkbox + // DY: align password checkbox with entry fields + _chkBoxSavePassword = SystemWidgetHelpers.createCheckBox( + c, 1, this, SystemResources.RESID_PASSWORD_SAVE_LABEL, SystemResources.RESID_PASSWORD_SAVE_TOOLTIP); + _chkBoxSavePassword.setSelection(savePassword); + // disable until the user enters something for consistency with the save user ID checkbox + _chkBoxSavePassword.setEnabled(false); + + _txtNewPassword.addModifyListener( + new ModifyListener() { + public void modifyText(ModifyEvent e) { + newPasswordModified = true; + validatePasswordInput(); + } + } + ); + + _txtConfirmPassword.addModifyListener( + new ModifyListener() { + public void modifyText(ModifyEvent e) { + confirmModified = true; + validatePasswordInput(); + } + } + ); + setInitialOKButtonEnabledState(false); + + return parent; + } + + /** + * Return true if the user elected to save the password + */ + private boolean internalGetIsSavePassword() + { + savePassword = _chkBoxSavePassword.getSelection(); + return savePassword; + } + + /** + * This hook method is called whenever the text changes in the password input fields. + */ + protected SystemMessage validatePasswordInput() + { + clearErrorMessage(); + _chkBoxSavePassword.setEnabled(newPasswordModified || confirmModified); + if (!newPasswordModified || !confirmModified) return null; + okButton.setEnabled(true); + + String newPassword = _txtNewPassword.getText().trim(); + String confirmPassword = _txtConfirmPassword.getText().trim(); + + if (!newPassword.equals(confirmPassword)) + { + return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_MISMATCH); + } + else if (newPassword.equals("")) + { + return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD); + } + _newPassword = newPassword; + return null; + } + + /** + * @see SystemPromptDialog#processOK() + */ + protected boolean processOK() + { + savePassword = internalGetIsSavePassword(); + SystemMessage error = validatePasswordInput(); + if (error == null) return true; + else setErrorMessage(error); + return false; + } + + /** + * @return The new password set by the user or null if the + * cancel button was pressed. + */ + public String getNewPassword() + { + return _newPassword; + } + + /** + * Return true if the user elected to make the changed user Id a permanent change. + */ + public boolean getIsSavePassword() + { + return savePassword; + } + + /** + * Preselect the save password checkbox. Default value is to not + * select the save password checkbox. + */ + public void setSavePassword(boolean save) + { + savePassword = save; + } +} diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemCopyProfileDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemCopyProfileDialog.java index 1137865983d..716b7e50ddb 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemCopyProfileDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemCopyProfileDialog.java @@ -17,10 +17,10 @@ package org.eclipse.rse.ui.dialogs; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.ISystemProfile; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.messages.ISystemMessageLine; @@ -71,9 +71,9 @@ public class SystemCopyProfileDialog extends SystemPromptDialog { setInputObject(profile); } - nameValidator = SystemPlugin.getTheSystemRegistry().getSystemProfileManager().getProfileNameValidator((String)null); + nameValidator = RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager().getProfileNameValidator((String)null); //pack(); - setHelp(SystemPlugin.HELPPREFIX+"drnp0000"); + setHelp(RSEUIPlugin.HELPPREFIX+"drnp0000"); } /** * Create message line. Intercept so we can set msg line of form. @@ -120,10 +120,10 @@ public class SystemCopyProfileDialog extends SystemPromptDialog composite_prompts, nbrColumns, null, SystemResources.RESID_NEWPROFILE_MAKEACTIVE_LABEL, SystemResources.RESID_NEWPROFILE_MAKEACTIVE_TOOLTIP); // SET HELP CONTEXT IDS... - //SystemWidgetHelpers.setHelp(newName, SystemPlugin.HELPPREFIX+"drnp0002", SystemPlugin.HELPPREFIX+"drnp0000"); - SystemWidgetHelpers.setHelp(newName, SystemPlugin.HELPPREFIX+"drnp0002"); - //SystemWidgetHelpers.setHelp(makeActiveCB, SystemPlugin.HELPPREFIX+"drnp0003", SystemPlugin.HELPPREFIX+"drnp0000"); - SystemWidgetHelpers.setHelp(makeActiveCB, SystemPlugin.HELPPREFIX+"drnp0003"); + //SystemWidgetHelpers.setHelp(newName, RSEUIPlugin.HELPPREFIX+"drnp0002", RSEUIPlugin.HELPPREFIX+"drnp0000"); + SystemWidgetHelpers.setHelp(newName, RSEUIPlugin.HELPPREFIX+"drnp0002"); + //SystemWidgetHelpers.setHelp(makeActiveCB, RSEUIPlugin.HELPPREFIX+"drnp0003", RSEUIPlugin.HELPPREFIX+"drnp0000"); + SystemWidgetHelpers.setHelp(makeActiveCB, RSEUIPlugin.HELPPREFIX+"drnp0003"); initialize(); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemDeleteDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemDeleteDialog.java index 8470d6f54e0..b5ad6562f2d 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemDeleteDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemDeleteDialog.java @@ -25,8 +25,8 @@ import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.TableLayout; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.rse.core.SystemAdapterHelpers; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.messages.ISystemMessageLine; @@ -96,7 +96,7 @@ public class SystemDeleteDialog extends SystemPromptDialog { super(shell, SystemResources.RESID_DELETE_TITLE); super.setOkButtonLabel(SystemResources.RESID_DELETE_BUTTON); - setHelp(SystemPlugin.HELPPREFIX+"ddlt0000"); + setHelp(RSEUIPlugin.HELPPREFIX+"ddlt0000"); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemDeleteTableRow.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemDeleteTableRow.java index 65a7c7d9905..0a80306e3cc 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemDeleteTableRow.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemDeleteTableRow.java @@ -21,9 +21,9 @@ import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.rse.core.SystemAdapterHelpers; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.filters.ISystemFilterPoolReference; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; import org.eclipse.rse.ui.view.ISystemViewElementAdapter; import org.eclipse.rse.ui.view.SystemViewResources; @@ -90,9 +90,9 @@ public class SystemDeleteTableRow this.imageDescriptor = ((ISystemTypedObject)element).getImageDescriptor(); else if (element instanceof IFolder) this.imageDescriptor = //PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER); - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FOLDER_ID); + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FOLDER_ID); else if (element instanceof IFile) - this.imageDescriptor = SystemPlugin.getDefault().getWorkbench().getEditorRegistry().getImageDescriptor(name); + this.imageDescriptor = RSEUIPlugin.getDefault().getWorkbench().getEditorRegistry().getImageDescriptor(name); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPersistancePrompt.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPersistencePrompt.java similarity index 84% rename from rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPersistancePrompt.java rename to rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPersistencePrompt.java index 77703884d92..0612c1b4f5c 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPersistancePrompt.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPersistencePrompt.java @@ -19,10 +19,10 @@ package org.eclipse.rse.ui.dialogs; import java.util.List; import org.eclipse.rse.core.PasswordPersistenceManager; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.SystemSignonInformation; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.swt.events.ModifyEvent; @@ -35,10 +35,10 @@ import org.eclipse.swt.widgets.Text; /** - * SystemPasswordPersistancePrompt is used with the save password preference page + * SystemPasswordPersistencePrompt is used with the save password preference page * to prompt the user to add or change password information. */ -public final class SystemPasswordPersistancePrompt extends SystemPromptDialog implements ModifyListener +public final class SystemPasswordPersistencePrompt extends SystemPromptDialog implements ModifyListener { @@ -52,11 +52,11 @@ public final class SystemPasswordPersistancePrompt extends SystemPromptDialog im private List existingEntries; /** - * Constructor for SystemPasswordPersistancePrompt. + * Constructor for SystemPasswordPersistencePrompt. * @param shell * @param title */ - public SystemPasswordPersistancePrompt(Shell shell, String title, List existingEntries, boolean change) { + public SystemPasswordPersistencePrompt(Shell shell, String title, List existingEntries, boolean change) { super(shell, title); this.change = change; this.existingEntries = existingEntries; @@ -127,7 +127,7 @@ public final class SystemPasswordPersistancePrompt extends SystemPromptDialog im String sHostName = hostname.getText(); if (sHostName == null || sHostName.trim().equals("")) { - setErrorMessage(SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD)); + setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD)); okButton.setEnabled(false); hostname.setFocus(); return false; @@ -136,7 +136,7 @@ public final class SystemPasswordPersistancePrompt extends SystemPromptDialog im String sSystemType = systemType.getText(); if (sSystemType == null || sSystemType.trim().equals("")) { - setErrorMessage(SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD)); + setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD)); okButton.setEnabled(false); systemType.setFocus(); return false; @@ -145,7 +145,7 @@ public final class SystemPasswordPersistancePrompt extends SystemPromptDialog im String sUserID = userid.getText(); if (sUserID == null || sUserID.trim().equals("")) { - setErrorMessage(SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD)); + setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD)); okButton.setEnabled(false); userid.setFocus(); return false; @@ -154,7 +154,7 @@ public final class SystemPasswordPersistancePrompt extends SystemPromptDialog im String sPwd1 = password.getText(); if (sPwd1 == null || sPwd1.trim().equals("")) { - setErrorMessage(SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD)); + setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD)); okButton.setEnabled(false); password.setFocus(); return false; @@ -163,7 +163,7 @@ public final class SystemPasswordPersistancePrompt extends SystemPromptDialog im String sPwd2 = passwordVerify.getText(); if (sPwd2 == null || sPwd2.trim().equals("")) { - setErrorMessage(SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD)); + setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD)); okButton.setEnabled(false); passwordVerify.setFocus(); return false; @@ -172,7 +172,7 @@ public final class SystemPasswordPersistancePrompt extends SystemPromptDialog im // Check if new and verify passwords match if (!sPwd1.equals(sPwd2)) { - setErrorMessage(SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_MISMATCH)); + setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_MISMATCH)); okButton.setEnabled(false); password.setFocus(); password.setSelection(0, sPwd1.length()); @@ -187,11 +187,11 @@ public final class SystemPasswordPersistancePrompt extends SystemPromptDialog im { if (!signonInfo.getSystemType().equals(originalSystemType) || !signonInfo.getHostname().equalsIgnoreCase(originalHostname) || - //!signonInfo.getHostname().equalsIgnoreCase(SystemPlugin.getQualifiedHostName(originalHostname)) || + //!signonInfo.getHostname().equalsIgnoreCase(RSEUIPlugin.getQualifiedHostName(originalHostname)) || !signonInfo.getUserid().equals(originalUserid)) { // User changed hostname, systemtype or userid and the change conflicts with an existing entry - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_EXISTS); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_EXISTS); msg.makeSubstitution(sUserID, sHostName); setErrorMessage(msg); okButton.setEnabled(false); @@ -205,7 +205,7 @@ public final class SystemPasswordPersistancePrompt extends SystemPromptDialog im // Adding a new entry, make sure it doesn't already exist if (exists(signonInfo.getHostname(), signonInfo.getUserid(), signonInfo.getSystemType())) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_EXISTS); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_EXISTS); msg.makeSubstitution(sUserID, sHostName); setErrorMessage(msg); okButton.setEnabled(false); @@ -253,12 +253,12 @@ public final class SystemPasswordPersistancePrompt extends SystemPromptDialog im super.createControl(parent); if (change) { - SystemWidgetHelpers.setCompositeHelp(parent, SystemPlugin.HELPPREFIX + "pwdi0002"); + SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "pwdi0002"); password.setFocus(); } else { - SystemWidgetHelpers.setCompositeHelp(parent, SystemPlugin.HELPPREFIX + "pwdi0001"); + SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "pwdi0001"); hostname.setFocus(); } } @@ -278,31 +278,31 @@ public final class SystemPasswordPersistancePrompt extends SystemPromptDialog im public void modifyText(ModifyEvent e) { if (e.getSource() == hostname && hostname.getText().trim().equals("")) { - setErrorMessage(SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD)); + setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD)); hostname.setFocus(); okButton.setEnabled(false); } else if (e.getSource() == userid && userid.getText().trim().equals("")) { - setErrorMessage(SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD)); + setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD)); userid.setFocus(); okButton.setEnabled(false); } else if (e.getSource() == systemType && systemType.getText().trim().equals("")) { - setErrorMessage(SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD)); + setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD)); systemType.setFocus(); okButton.setEnabled(false); } else if (e.getSource() == password && password.getText().trim().equals("")) { - setErrorMessage(SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD)); + setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD)); password.setFocus(); okButton.setEnabled(false); } else if (e.getSource() == passwordVerify && passwordVerify.getText().trim().equals("")) { - setErrorMessage(SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD)); + setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD)); passwordVerify.setFocus(); okButton.setEnabled(false); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPromptDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPromptDialog.java index 0c8c0207c88..2a84c5b1d5b 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPromptDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPromptDialog.java @@ -15,11 +15,11 @@ ********************************************************************************/ package org.eclipse.rse.ui.dialogs; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemPreferencesManager; import org.eclipse.rse.core.subsystems.IConnectorService; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.validators.ISystemValidator; @@ -79,7 +79,7 @@ public final class SystemPasswordPromptDialog { super(shell, SystemResources.RESID_PASSWORD_TITLE); //pack(); - setHelp(SystemPlugin.HELPPREFIX+"pwdp0000"); + setHelp(RSEUIPlugin.HELPPREFIX+"pwdp0000"); } /** * Set the input System object in which the user is attempting to do a connect action. @@ -238,7 +238,7 @@ public final class SystemPasswordPromptDialog ); - //SystemWidgetHelpers.setHelp(composite, SystemPlugin.HELPPREFIX+"pwdp0000"); + //SystemWidgetHelpers.setHelp(composite, RSEUIPlugin.HELPPREFIX+"pwdp0000"); return composite; } @@ -357,7 +357,7 @@ public final class SystemPasswordPromptDialog if (userIdValidator != null) errorMessage= userIdValidator.validate(userId); else if (userId.equals("")) - errorMessage = SystemPlugin.getPluginMessage(MSG_VALIDATE_USERID_EMPTY); + errorMessage = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_USERID_EMPTY); userIdOK = (errorMessage == null); if (!userIdOK) { @@ -389,7 +389,7 @@ public final class SystemPasswordPromptDialog if (passwordValidator != null) errorMessage= passwordValidator.validate(password); else if (password.equals("")) - errorMessage = SystemPlugin.getPluginMessage(MSG_VALIDATE_PASSWORD_EMPTY); + errorMessage = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_PASSWORD_EMPTY); passwordOK = (errorMessage == null); if (!passwordOK) { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPromptDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPromptDialog.java index 9d59615b30a..9e09d553d5e 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPromptDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPromptDialog.java @@ -15,6 +15,7 @@ ********************************************************************************/ package org.eclipse.rse.ui.dialogs; + import java.lang.reflect.InvocationTargetException; import java.util.HashMap; import java.util.Map; @@ -25,14 +26,15 @@ import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.operation.ModalContext; +import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.jface.viewers.ICellEditorValidator; import org.eclipse.jface.wizard.ProgressMonitorPart; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.Mnemonics; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.messages.ISystemMessageLine; @@ -148,6 +150,8 @@ public abstract class SystemPromptDialog protected Button okButton, cancelButton, testButton, browseButton, addButton, detailsButton; protected String title, labelOk, labelBrowse, labelTest, labelCancel, labelAdd, labelDetailsShow, labelDetailsHide; protected String tipOk, tipBrowse, tipTest, tipCancel, tipAdd, tipDetailsShow, tipDetailsHide; + protected boolean noShowAgainOption; + protected Button noShowAgainButton; protected String detailsShowLabel; protected String detailsHideLabel; protected String helpId; @@ -174,7 +178,12 @@ public abstract class SystemPromptDialog protected Cursor waitCursor; protected Cursor arrowCursor; protected MessageDialog windowClosingDialog; - protected SelectionAdapter cancelListener; + protected SelectionAdapter cancelListener; + + // preference stuff for option to not show the dialog again + protected IPreferenceStore prefStore; + protected String prefId; + protected boolean prefValAsSelected; private static final String FOCUS_CONTROL = "focusControl";//$NON-NLS-1$ @@ -796,7 +805,22 @@ public abstract class SystemPromptDialog */ public void handleEvent(Event e) { - //Widget source = e.widget; + if (e.type == SWT.Selection) { + + if (e.widget == noShowAgainButton) { + boolean isNoShowSelected = noShowAgainButton.getSelection(); + + if ((prefStore != null) && (prefId != null)) { + + if (prefValAsSelected) { + prefStore.setValue(prefId, isNoShowSelected); + } + else { + prefStore.setValue(prefId, !isNoShowSelected); + } + } + } + } } /** @@ -1048,16 +1072,16 @@ public abstract class SystemPromptDialog separator= new Label(parentComposite, SWT.HORIZONTAL | SWT.SEPARATOR); separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); } - if (SystemPlugin.isTheSystemRegistryActive()) + if (RSEUIPlugin.isTheSystemRegistryActive()) { - SystemPlugin.getTheSystemRegistry().setRunnableContext(getShell(),this); + RSEUIPlugin.getTheSystemRegistry().setRunnableContext(getShell(),this); // add a dispose listener for the shell getShell().addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { //System.out.println("Inside dispose for SystemPromptDialog"); - SystemPlugin.getTheSystemRegistry().clearRunnableContext(); + RSEUIPlugin.getTheSystemRegistry().clearRunnableContext(); } }); } @@ -1135,6 +1159,11 @@ public abstract class SystemPromptDialog c.setLayoutData(new GridData(GridData.FILL_BOTH)); Control inner = createInner(c); // allows for child classes to override. + + // if user wants the option to not show the dialog again + if (noShowAgainOption) { + noShowAgainButton = createNoShowAgainButton(c); + } /* * And now is the time to auto-size if so requested... @@ -1174,6 +1203,38 @@ public abstract class SystemPromptDialog return c; } + /** + * Set option to not show this dialog again and specify the preference that should be set + * according to whether the user selects to show the dialog again or no. The caller can + * query this preference to find out what the user selection is. + * @param noShowAgainOption true to show the option in the dialog, false to not show it. + * @param prefStore the preference store. + * @param prefId the preference id for which a boolean value will be stored according to the user's selection. + * @param prefValAsSelected whether to mirror the user selection in the preference. If this is set to + * true, then the value stored in the preference is true if the user selects the option, + * and false if the user does not select the option. If this is set to false, then the + * value stored in the preference will be false if the user selects the option, and true + * if the user does not select the option + */ + public void setNoShowAgainOption(boolean noShowAgainOption, IPreferenceStore prefStore, String prefId, boolean prefValAsSelected) { + this.noShowAgainOption = noShowAgainOption; + this.prefStore = prefStore; + this.prefId = prefId; + this.prefValAsSelected = prefValAsSelected; + } + + /** + * Creates a button to allow option to not show this dialog again. + * @return the button that allows option to not show this dialog again. + */ + protected Button createNoShowAgainButton(Composite c) { + Button b = new Button(c, SWT.CHECK); + b.setText(SystemResources.RESID_DO_NOT_SHOW_MESSAGE_AGAIN_LABEL); + b.setToolTipText(SystemResources.RESID_DO_NOT_SHOW_MESSAGE_AGAIN_TOOLTIP); + b.addListener(SWT.Selection, this); + return b; + } + /** * Call this to disable the Apply button if the input is not complete or not valid. */ @@ -1366,7 +1427,7 @@ public abstract class SystemPromptDialog fMessageLine.setErrorMessage(exc); else { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED); msg.makeSubstitution(exc); (new SystemMessageDialog(getShell(),msg)).open(); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameDialog.java index fa97e9d849c..445f45bfcd4 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameDialog.java @@ -35,10 +35,10 @@ import org.eclipse.jface.viewers.TableLayout; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.TextCellEditor; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.IHost; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.messages.ISystemMessageLine; @@ -184,7 +184,7 @@ public class SystemRenameDialog extends SystemPromptDialog super(shell, title); //pack(); - setHelp(SystemPlugin.HELPPREFIX+"drnm0000"); + setHelp(RSEUIPlugin.HELPPREFIX+"drnm0000"); } /** * Set the verbage to show above the table. The default is "Enter new name for each resource" @@ -390,12 +390,12 @@ public class SystemRenameDialog extends SystemPromptDialog String canonicalNewName = rows[idx].getCanonicalNewName(); // defect 42145 //if (oldName.equalsIgnoreCase(newName)) // does not consider case for linux or unix or quoted names on iseries if (rows[idx].newNameEqualsOldName()) - errMsg = SystemPlugin.getPluginMessage(MSG_VALIDATE_RENAME_OLDEQUALSNEW).makeSubstitution(oldName); - //errMsg = SystemMessage.sub(SystemPlugin.getString(MSG_VALIDATE_RENAME_OLDEQUALSNEW),SystemMessage.MSG_SUB1,newName); + errMsg = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_RENAME_OLDEQUALSNEW).makeSubstitution(oldName); + //errMsg = SystemMessage.sub(RSEUIPlugin.getString(MSG_VALIDATE_RENAME_OLDEQUALSNEW),SystemMessage.MSG_SUB1,newName); //else if (newNames.contains(newName)) defect 42145 else if (newNames.contains(canonicalNewName)) - errMsg = SystemPlugin.getPluginMessage(MSG_VALIDATE_RENAME_NOTUNIQUE).makeSubstitution(newName); - //errMsg = SystemMessage.sub(SystemPlugin.getString(MSG_VALIDATE_RENAME_NOTUNIQUE),SystemMessage.MSG_SUB1,newName); + errMsg = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_RENAME_NOTUNIQUE).makeSubstitution(newName); + //errMsg = SystemMessage.sub(RSEUIPlugin.getString(MSG_VALIDATE_RENAME_NOTUNIQUE),SystemMessage.MSG_SUB1,newName); else { ISystemValidator nameValidator = rows[idx].getNameValidator(); @@ -411,7 +411,7 @@ public class SystemRenameDialog extends SystemPromptDialog { boolean ok = ValidatorConnectionName.validateNameNotInUse(newName, getShell()); if (!ok) - errMsg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_CANCELLED); + errMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_CANCELLED); } } @@ -630,8 +630,8 @@ public class SystemRenameDialog extends SystemPromptDialog if ((names != null) && (names.length>0)) { uniqueNameValidator = new ValidatorUniqueString(names,caseSensitive); - uniqueNameValidator.setErrorMessages(SystemPlugin.getPluginMessage(MSG_VALIDATE_NAME_EMPTY), - SystemPlugin.getPluginMessage(MSG_VALIDATE_NAME_NOTUNIQUE)); + uniqueNameValidator.setErrorMessages(RSEUIPlugin.getPluginMessage(MSG_VALIDATE_NAME_EMPTY), + RSEUIPlugin.getPluginMessage(MSG_VALIDATE_NAME_NOTUNIQUE)); uniqueNameValidatorPerParent.put(parentName, uniqueNameValidator); if (debug) { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameSingleDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameSingleDialog.java index 0b27b11661c..a6205fa9e3b 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameSingleDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameSingleDialog.java @@ -22,11 +22,11 @@ import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.rse.core.SystemAdapterHelpers; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.filters.ISystemFilterPoolReference; import org.eclipse.rse.model.IHost; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.messages.ISystemMessageLine; @@ -118,7 +118,7 @@ public class SystemRenameSingleDialog extends SystemPromptDialog //pack(); setBlockOnOpen(true); - setHelp(SystemPlugin.HELPPREFIX+"drns0000"); + setHelp(RSEUIPlugin.HELPPREFIX+"drns0000"); } /** @@ -157,17 +157,17 @@ public class SystemRenameSingleDialog extends SystemPromptDialog { if (this.inputObject != null && this.inputObject instanceof IHost) { - setHelp(SystemPlugin.HELPPREFIX+"dccc0000"); + setHelp(RSEUIPlugin.HELPPREFIX+"dccc0000"); } else { - setHelp(SystemPlugin.HELPPREFIX+"drns0001"); + setHelp(RSEUIPlugin.HELPPREFIX+"drns0001"); } setTitle(SystemResources.RESID_COLLISION_RENAME_TITLE); } else if (this.copyCollisionMode) // from true to false { - setHelp(SystemPlugin.HELPPREFIX+"drns0000"); + setHelp(RSEUIPlugin.HELPPREFIX+"drns0000"); String singleTitle = SystemResources.RESID_RENAME_SINGLE_TITLE; if (!singleTitle.startsWith("Missing")) // TODO: remove test after next mri rev setTitle(singleTitle); @@ -334,7 +334,7 @@ public class SystemRenameSingleDialog extends SystemPromptDialog else if (inputElement instanceof String) inputName = (String)inputElement; newName.setText(inputName); - newName.selectAll(); + if (copyCollisionMode) { verbageLabel.setText(SystemMessage.sub(SystemResources.RESID_COLLISION_RENAME_VERBAGE, "&1", inputName)); @@ -416,16 +416,16 @@ public class SystemRenameSingleDialog extends SystemPromptDialog super.setBusyCursor(true); try { Shell shell = getShell(); - IRunnableContext irc = SystemPlugin.getTheSystemRegistry().getRunnableContext(); - SystemPlugin.getTheSystemRegistry().clearRunnableContext(); + IRunnableContext irc = RSEUIPlugin.getTheSystemRegistry().getRunnableContext(); + RSEUIPlugin.getTheSystemRegistry().clearRunnableContext(); names = ra.getRemoteParentNamesInUse(shell, inputElement); - SystemPlugin.getTheSystemRegistry().setRunnableContext(shell, irc); + RSEUIPlugin.getTheSystemRegistry().setRunnableContext(shell, irc); } catch (Exception exc) {SystemBasePlugin.logError("Exception getting parent's child names in rename dialog",exc);} if ((names != null) && (names.length>0)) { uniqueNameValidator = new ValidatorUniqueString(names,caseSensitive); - uniqueNameValidator.setErrorMessages(SystemPlugin.getPluginMessage(MSG_VALIDATE_NAME_EMPTY), - SystemPlugin.getPluginMessage(MSG_VALIDATE_NAME_NOTUNIQUE)); + uniqueNameValidator.setErrorMessages(RSEUIPlugin.getPluginMessage(MSG_VALIDATE_NAME_EMPTY), + RSEUIPlugin.getPluginMessage(MSG_VALIDATE_NAME_NOTUNIQUE)); if (debug) { System.out.println("Name validator set. Names = "); @@ -595,18 +595,18 @@ public class SystemRenameSingleDialog extends SystemPromptDialog if (theNewName == null) { - errorMessage = SystemPlugin.getPluginMessage(MSG_VALIDATE_NAME_EMPTY); + errorMessage = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_NAME_EMPTY); } else { if (nameValidator != null) errorMessage= nameValidator.validate(theNewName); else if (theNewName.length() == 0) - errorMessage = SystemPlugin.getPluginMessage(MSG_VALIDATE_NAME_EMPTY); + errorMessage = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_NAME_EMPTY); if (errorMessage == null) { if (adapter != null && adapter.namesAreEqual(inputElement, theNewName)) - errorMessage = SystemPlugin.getPluginMessage(MSG_VALIDATE_RENAME_OLDEQUALSNEW).makeSubstitution(inputName); + errorMessage = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_RENAME_OLDEQUALSNEW).makeSubstitution(inputName); } } @@ -709,7 +709,4 @@ public class SystemRenameSingleDialog extends SystemPromptDialog } } - - - } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameTableProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameTableProvider.java index af6d09312d9..99770b1af6c 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameTableProvider.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameTableProvider.java @@ -92,7 +92,7 @@ public class SystemRenameTableProvider implements ITableLabelProvider, IStructur if (row.getError()) { Image errorImage = JFaceResources.getImage(org.eclipse.jface.dialogs.Dialog.DLG_IMG_MESSAGE_ERROR); - //SystemPlugin.getDefault().getImage(ISystemConstants.ICON_SYSTEM_ERROR_ID); + //RSEUIPlugin.getDefault().getImage(ISystemConstants.ICON_SYSTEM_ERROR_ID); return errorImage; } else diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectAnythingDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectAnythingDialog.java index 06807be2c8c..cdce86d13f9 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectAnythingDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectAnythingDialog.java @@ -19,7 +19,7 @@ package org.eclipse.rse.ui.dialogs; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.rse.core.SystemPlugin; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.view.ISystemPropertyConstants; import org.eclipse.rse.ui.view.ISystemViewInputProvider; import org.eclipse.rse.ui.view.SystemViewForm; @@ -63,7 +63,7 @@ public class SystemSelectAnythingDialog extends SystemPromptDialog */ protected ISystemViewInputProvider getInputProvider() { - ISystemViewInputProvider inputProvider = SystemPlugin.getTheSystemRegistry(); + ISystemViewInputProvider inputProvider = RSEUIPlugin.getTheSystemRegistry(); return inputProvider; } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectConnectionDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectConnectionDialog.java index ab9dce9e0cd..7ed65173c15 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectConnectionDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectConnectionDialog.java @@ -109,7 +109,7 @@ public class SystemSelectConnectionDialog * Restrict to certain system types * @param systemTypes the system types to restrict what connections are shown and what types of connections * the user can create - * @see org.eclipse.rse.core.ISystemTypes + * @see org.eclipse.rse.core.IRSESystemType */ public void setSystemTypes(String[] systemTypes) { @@ -119,7 +119,7 @@ public class SystemSelectConnectionDialog * Restrict to a certain system type * @param systemType the system type to restrict what connections are shown and what types of connections * the user can create - * @see org.eclipse.rse.core.ISystemTypes + * @see org.eclipse.rse.core.IRSESystemType */ public void setSystemType(String systemType) { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleContentElement.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleContentElement.java index 7ae1b409a81..61d3bd21045 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleContentElement.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleContentElement.java @@ -18,8 +18,8 @@ package org.eclipse.rse.ui.dialogs; import java.util.Vector; import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; /** * When we populate a TreeViewer in a dialog, we need a simple @@ -249,7 +249,7 @@ public class SystemSimpleContentElement if (imageDescriptor != null) return imageDescriptor; else - return SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FOLDER_ID); + return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FOLDER_ID); //return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleCopyDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleCopyDialog.java index df0faf1b9fc..099ecfeaaf4 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleCopyDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleCopyDialog.java @@ -69,7 +69,7 @@ public class SystemSimpleCopyDialog promptString = prompt; this.copyTreeContent = copyTreeContent; this.initialSelection = selection; - //setCancelButtonLabel(SystemPlugin.getString(BUTTON_CLOSE)); + //setCancelButtonLabel(RSEUIPlugin.getString(BUTTON_CLOSE)); //pack(); } /** @@ -133,7 +133,7 @@ public class SystemSimpleCopyDialog //ActionContributionItem[] actionItems = createActionContributionItems(); //Composite buttons = createButtonBar(composite_prompts, actionItems); - //SystemPlugin.getDefault().getSystemRegistry().addSystemResourceChangeListener(this); + //RSEUIPlugin.getDefault().getSystemRegistry().addSystemResourceChangeListener(this); return composite_prompts; } @@ -202,7 +202,7 @@ public class SystemSimpleCopyDialog public boolean close() { - //SystemPlugin.getDefault().getSystemRegistry().removeSystemResourceChangeListener(this); + //RSEUIPlugin.getDefault().getSystemRegistry().removeSystemResourceChangeListener(this); return super.close(); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemTestFilterStringDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemTestFilterStringDialog.java index 5fecb489372..11bad746334 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemTestFilterStringDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemTestFilterStringDialog.java @@ -17,10 +17,10 @@ package org.eclipse.rse.ui.dialogs; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.rse.core.SystemPlugin; 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; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.view.SystemTestFilterStringAPIProviderImpl; @@ -86,7 +86,7 @@ public class SystemTestFilterStringDialog this.subsystem = subsystem; this.filterString = filterString; this.subsystemFactoryId = subsystem.getSubSystemConfiguration().getId(); - sr = SystemPlugin.getTheSystemRegistry(); + sr = RSEUIPlugin.getTheSystemRegistry(); setNeedsProgressMonitor(true); //pack(); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemUpdateConnectionDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemUpdateConnectionDialog.java index a34891a4d0a..2211122323b 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemUpdateConnectionDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemUpdateConnectionDialog.java @@ -15,11 +15,11 @@ ********************************************************************************/ package org.eclipse.rse.ui.dialogs; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.IHost; import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.ui.ISystemConnectionFormCaller; import org.eclipse.rse.ui.SystemConnectionForm; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.messages.ISystemMessageLine; import org.eclipse.rse.ui.validators.ISystemValidator; @@ -44,7 +44,7 @@ public class SystemUpdateConnectionDialog extends SystemPromptDialog implements public SystemUpdateConnectionDialog(Shell shell) { super(shell, SystemResources.RESID_CHGCONN_TITLE); - parentHelpId = SystemPlugin.HELPPREFIX + "dcon0000"; + parentHelpId = RSEUIPlugin.HELPPREFIX + "dcon0000"; getForm(); //pack(); } @@ -120,7 +120,7 @@ public class SystemUpdateConnectionDialog extends SystemPromptDialog implements if (closeDialog) { IHost conn = (IHost)getInputObject(); - ISystemRegistry sr = SystemPlugin.getDefault().getSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); sr.updateHost( getShell(),conn,conn.getSystemType(),form.getConnectionName(), form.getHostName(), form.getConnectionDescription(), form.getDefaultUserId(), form.getUserIdLocation() ); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemUserIdPerSystemTypeDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemUserIdPerSystemTypeDialog.java deleted file mode 100644 index c03522b788d..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemUserIdPerSystemTypeDialog.java +++ /dev/null @@ -1,243 +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.ui.dialogs; -import org.eclipse.rse.core.SystemPlugin; -import org.eclipse.rse.core.SystemPreferencesManager; -import org.eclipse.rse.core.SystemType; -import org.eclipse.rse.services.clientserver.messages.SystemMessage; -import org.eclipse.rse.ui.ISystemIconConstants; -import org.eclipse.rse.ui.ISystemMessages; -import org.eclipse.rse.ui.SystemResources; -import org.eclipse.rse.ui.SystemWidgetHelpers; -import org.eclipse.rse.ui.messages.ISystemMessageLine; -import org.eclipse.rse.ui.validators.ISystemValidator; -import org.eclipse.rse.ui.validators.ValidatorUserId; -import org.eclipse.rse.ui.view.ISystemPropertyConstants; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; - -/** - * Dialog for renaming a system profile. - */ -public class SystemUserIdPerSystemTypeDialog extends SystemPromptDialog - implements ISystemMessages, ISystemPropertyConstants, - ISystemIconConstants -{ - private Text userId; - private Label systemTypePromptLabel, systemTypeLabel; - private String userIdString, inputUserId; - private SystemMessage errorMessage; - private ISystemValidator userIdValidator; - private boolean initialized = false; - private SystemType systemType; - - /** - * Constructor - */ - public SystemUserIdPerSystemTypeDialog(Shell shell, SystemType systemType) - { - super(shell, SystemResources.RESID_USERID_PER_SYSTEMTYPE_TITLE); - this.systemType = systemType; - if (systemType != null) - { - setInputObject(systemType); - } - userIdValidator = new ValidatorUserId(false); // false => allow empty? No. - //pack(); - setHelp(SystemPlugin.HELPPREFIX + "ddid0000"); - } - /** - * Create message line. Intercept so we can set msg line of form. - */ - protected ISystemMessageLine createMessageLine(Composite c) - { - ISystemMessageLine msgLine = super.createMessageLine(c); - //form.setMessageLine(msgLine); - return fMessageLine; - } - - - /** - * @see SystemPromptDialog#getInitialFocusControl() - */ - protected Control getInitialFocusControl() - { - return userId; - } - - /** - * Set the UserId validator. - * By default, we use ValidatorUserId - */ - public void setUserIdValidator(ISystemValidator uiv) - { - userIdValidator = uiv; - } - - /** - * @see SystemPromptDialog#createInner(Composite) - */ - protected Control createInner(Composite parent) - { - // Inner composite - Composite composite_prompts = SystemWidgetHelpers.createComposite( - parent, 2); - - // SYSTEM TYPE - systemTypePromptLabel = SystemWidgetHelpers.createLabel(composite_prompts,SystemResources.RESID_USERID_PER_SYSTEMTYPE_SYSTEMTYPE_LABEL); - //systemTypePromptLabel.setToolTipText(SystemPlugin.getString(RESID_USERID_PER_SYSTEMTYPE_SYSTEMTYPE_ROOT+"tooltip")); - - systemTypeLabel = SystemWidgetHelpers.createLabel(composite_prompts,""); - systemTypeLabel.setToolTipText(SystemResources.RESID_USERID_PER_SYSTEMTYPE_TOOLTIP); - systemTypeLabel.setText(systemType.getName()); - - - // ENTRY FIELD - userId = SystemWidgetHelpers.createLabeledTextField(composite_prompts,null, - SystemResources.RESID_USERID_PER_SYSTEMTYPE_LABEL, - SystemResources.RESID_USERID_PER_SYSTEMTYPE_TOOLTIP); - initialize(); - - // add keystroke listeners... - userId.addModifyListener( - new ModifyListener() { - public void modifyText(ModifyEvent e) { - validateUserIdInput(); - } - } - ); - - return composite_prompts; - } - - - /** - * Override of parent. Must pass selected object onto the form for initializing fields. - * Called by SystemDialogAction's default run() method after dialog instantiated. - * INPUT OBJECT MUST BE OF TYPE SYSTEMTYPE. - */ - public void setInputObject(Object inputObject) - { - //System.out.println("INSIDE SETINPUTOBJECT: " + inputObject + ", "+inputObject.getClass().getName()); - super.setInputObject(inputObject); - if (inputObject instanceof SystemType) - { - SystemType type = (SystemType)inputObject; - inputUserId = SystemPreferencesManager.getPreferencesManager().getDefaultUserId(type.getName()); - } - initialize(); - } - - /** - * Initialize input fields from input - */ - protected void initialize() - { - if (!initialized && (userId!=null) && (inputUserId!=null)) - { - initialized = true; - userId.setText(inputUserId); - userId.selectAll(); - } - setPageComplete(false); // well, should empty be valid! - } - /** - * Called when user presses OK button. - * Return true to close dialog. - * Return false to not close dialog. - */ - protected boolean processOK() - { - userIdString = userId.getText().trim(); - boolean closeDialog = verify(); - if (closeDialog) - { - setOutputObject(userIdString); - } - return closeDialog; - } - /** - * Verifies all input. - * @return true if there are no errors in the user input - */ - public boolean verify() - { - //clearErrorMessage(); - SystemMessage errMsg = validateUserIdInput(); - if (errMsg != null) - { - userId.setFocus(); - } - return (errMsg == null); - } - - /** - * Validate the userId as the user types it. - * @see #setUserIdValidator(ISystemValidator) - */ - protected SystemMessage validateUserIdInput() - { - errorMessage = userIdValidator.validate(userId.getText().trim()); - if (errorMessage != null) - setErrorMessage(errorMessage); - else - clearErrorMessage(); - setPageComplete(); - return errorMessage; - } - - - /** - * This method can be called by the dialog or wizard page host, to decide whether to enable - * or disable the next, final or ok buttons. It returns true if the minimal information is - * available and is correct. - */ - public boolean isPageComplete() - { - boolean pageComplete = false; - if (errorMessage == null) - { - String theNewUserId = userId.getText().trim(); - pageComplete = (theNewUserId.length() > 0); - //pageComplete = (theNewUserId.length() > 0) && !(theNewUserId.equalsIgnoreCase(inputUserId)); - //pageComplete = true; // should empty be valid? - } - return pageComplete; - } - - /** - * Inform caller of page-complete status of this form - */ - public void setPageComplete() - { - setPageComplete(isPageComplete()); - } - - /** - * Returns the user-entered new user Id - */ - public String getUserId() - { - return userIdString; - } - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemWizardDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemWizardDialog.java index 1cfee6d301a..10a78f7a989 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemWizardDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemWizardDialog.java @@ -19,7 +19,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.wizard.IWizardPage; import org.eclipse.jface.wizard.ProgressMonitorPart; import org.eclipse.jface.wizard.WizardDialog; -import org.eclipse.rse.core.SystemPlugin; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.wizards.ISystemWizard; import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; @@ -150,15 +150,15 @@ public class SystemWizardDialog IProgressMonitor pm = getProgressMonitor(); ((ProgressMonitorPart)pm).dispose(); } - if (needsMonitor && SystemPlugin.isTheSystemRegistryActive()) + if (needsMonitor && RSEUIPlugin.isTheSystemRegistryActive()) { - SystemPlugin.getTheSystemRegistry().setRunnableContext(getShell(), this); + RSEUIPlugin.getTheSystemRegistry().setRunnableContext(getShell(), this); // add a dispose listener getShell().addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { - SystemPlugin.getTheSystemRegistry().clearRunnableContext(); + RSEUIPlugin.getTheSystemRegistry().clearRunnableContext(); } }); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemWorkWithHistoryDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemWorkWithHistoryDialog.java index 52673949c01..3b7c8e529b7 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemWorkWithHistoryDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemWorkWithHistoryDialog.java @@ -16,8 +16,8 @@ package org.eclipse.rse.ui.dialogs; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.swt.SWT; @@ -70,7 +70,7 @@ public class SystemWorkWithHistoryDialog extends SystemPromptDialog implements I historyInput = history; //pack(); - setHelp(SystemPlugin.HELPPREFIX+"dwwh0000"); + setHelp(RSEUIPlugin.HELPPREFIX+"dwwh0000"); setInitialOKButtonEnabledState(false); //d41471 } 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 7da228b3e2a..813ed87ac1f 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,7 +23,6 @@ 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.core.SystemPlugin; import org.eclipse.rse.filters.ISystemFilter; import org.eclipse.rse.filters.ISystemFilterPool; import org.eclipse.rse.filters.ISystemFilterPoolManager; @@ -35,6 +34,7 @@ import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.SystemBaseForm; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.actions.ISystemAction; @@ -369,7 +369,7 @@ public class SystemChangeFilterPane extends SystemBaseForm */ public Control createContents(Composite parent) { - SystemWidgetHelpers.setHelp(parent, SystemPlugin.HELPPREFIX+"dufr0000"); + SystemWidgetHelpers.setHelp(parent, RSEUIPlugin.HELPPREFIX+"dufr0000"); if (getShell()==null) setShell(parent.getShell()); @@ -645,7 +645,7 @@ public class SystemChangeFilterPane extends SystemBaseForm String duplicate = checkForDuplicates(); if (duplicate != null) { - SystemMessage errMsg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERSTRING_DUPLICATES).makeSubstitution(duplicate); + SystemMessage errMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERSTRING_DUPLICATES).makeSubstitution(duplicate); getMessageLine().setErrorMessage(errMsg); listView.setFocus(); return false; @@ -679,7 +679,7 @@ public class SystemChangeFilterPane extends SystemBaseForm catch (Exception exc) { //displayErrorMessage("Error updating filter: " + exc.getMessage()); - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_UPDATEFILTER_FAILED); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UPDATEFILTER_FAILED); String excText = exc.getMessage(); if (excText == null) excText = exc.getClass().getName(); @@ -724,7 +724,7 @@ public class SystemChangeFilterPane extends SystemBaseForm String duplicate = checkForDuplicates(); if (duplicate != null) { - SystemMessage errMsg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERSTRING_DUPLICATES).makeSubstitution(duplicate); + SystemMessage errMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERSTRING_DUPLICATES).makeSubstitution(duplicate); getMessageLine().setErrorMessage(errMsg); listView.setFocus(); return false; @@ -1209,7 +1209,7 @@ public class SystemChangeFilterPane extends SystemBaseForm public void doDelete() { int idx = listView.getSelectionIndex(); - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONFIRM_DELETE); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONFIRM_DELETE); SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), msg); try{ if (msgDlg.openQuestion()) 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 8fbf4a538b1..f3eccc8141d 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,11 +17,11 @@ package org.eclipse.rse.ui.filters; import java.util.Vector; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.swt.SWT; @@ -617,7 +617,7 @@ public class SystemFilterStringEditPane implements SelectionListener //if (validator != null) // errorMessage = validateFilterString(textString.getText()); if ((textString!=null) && (textString.getText().trim().length() == 0)) - errorMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERSTRING_EMPTY); + errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERSTRING_EMPTY); fireChangeEvent(errorMessage); //setPageComplete(); //setErrorMessage(errorMessage); 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 901a8e23af9..36d7af86098 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,13 +18,13 @@ package org.eclipse.rse.ui.filters; import java.util.Vector; import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.rse.core.SystemPlugin; 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; @@ -125,7 +125,7 @@ public class SystemFilterUIHelpers poolMgrImage = adapter.getSystemFilterPoolManagerImage(); } if (poolMgrImage == null) - poolMgrImage = SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERPOOL_ID); + poolMgrImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERPOOL_ID); return poolMgrImage; } @@ -144,7 +144,7 @@ public class SystemFilterUIHelpers poolImage = adapter.getSystemFilterPoolImage(pool); } if (poolImage == null) - poolImage = SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERPOOL_ID); + poolImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERPOOL_ID); return poolImage; } @@ -162,7 +162,7 @@ public class SystemFilterUIHelpers filterImage = adapter.getSystemFilterImage(filter); } if (filterImage == null) - filterImage = SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTER_ID); + filterImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTER_ID); return filterImage; } 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 b9a7184e1a0..b1fb3050b55 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,7 +18,6 @@ package org.eclipse.rse.ui.filters.actions; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.filters.ISystemFilter; import org.eclipse.rse.filters.ISystemFilterPool; import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; @@ -27,6 +26,7 @@ import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; import org.eclipse.rse.filters.ISystemFilterReference; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseDialogAction; import org.eclipse.rse.ui.filters.SystemFilterStringEditPane; @@ -51,12 +51,12 @@ public class SystemChangeFilterAction extends SystemBaseDialogAction public SystemChangeFilterAction(Shell parent) { this( parent, SystemResources.ACTION_UPDATEFILTER_LABEL, SystemResources.ACTION_UPDATEFILTER_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CHANGEFILTER_ID)); + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CHANGEFILTER_ID)); } public SystemChangeFilterAction(Shell parent, String label, String tooltip) { - this(parent, label, tooltip, SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CHANGEFILTER_ID)); + this(parent, label, tooltip, RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CHANGEFILTER_ID)); } public SystemChangeFilterAction(Shell parent, String label, String tooltip, ImageDescriptor image) @@ -64,7 +64,7 @@ public class SystemChangeFilterAction extends SystemBaseDialogAction super(label, tooltip, image, parent); allowOnMultipleSelection(false); setContextMenuGroup(ISystemContextMenuConstants.GROUP_CHANGE); - setHelp(SystemPlugin.HELPPREFIX+"acfr0000"); + setHelp(RSEUIPlugin.HELPPREFIX+"acfr0000"); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionCopyString.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionCopyString.java index c4f73ff45ea..534f2eb2bad 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionCopyString.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionCopyString.java @@ -16,8 +16,8 @@ package org.eclipse.rse.ui.filters.actions; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemContextMenuConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.rse.ui.filters.SystemChangeFilterPane; @@ -46,7 +46,7 @@ public class SystemChangeFilterActionCopyString extends SystemBaseAction allowOnMultipleSelection(false); this.parentDialog = parentDialog; setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE); - setHelp(SystemPlugin.HELPPREFIX+"dufr2000"); + setHelp(RSEUIPlugin.HELPPREFIX+"dufr2000"); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionDeleteString.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionDeleteString.java index 0a54ccea851..931834b3720 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionDeleteString.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionDeleteString.java @@ -17,8 +17,8 @@ package org.eclipse.rse.ui.filters.actions; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemContextMenuConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.rse.ui.filters.SystemChangeFilterPane; @@ -47,7 +47,7 @@ public class SystemChangeFilterActionDeleteString extends SystemBaseAction allowOnMultipleSelection(false); this.parentDialog = parentDialog; setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE); - setHelp(SystemPlugin.HELPPREFIX+"dufr1000"); + setHelp(RSEUIPlugin.HELPPREFIX+"dufr1000"); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionMoveStringDown.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionMoveStringDown.java index b6d49889fac..442be5bde29 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionMoveStringDown.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionMoveStringDown.java @@ -17,9 +17,9 @@ package org.eclipse.rse.ui.filters.actions; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.rse.ui.filters.SystemChangeFilterPane; @@ -40,12 +40,12 @@ public class SystemChangeFilterActionMoveStringDown extends SystemBaseAction public SystemChangeFilterActionMoveStringDown(SystemChangeFilterPane parentDialog) { super(SystemResources.ACTION_MOVEDOWN_LABEL,SystemResources.ACTION_MOVEDOWN_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID), null); allowOnMultipleSelection(false); this.parentDialog = parentDialog; setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORDER); - setHelp(SystemPlugin.HELPPREFIX+"dufr5000"); + setHelp(RSEUIPlugin.HELPPREFIX+"dufr5000"); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionMoveStringUp.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionMoveStringUp.java index 7d45be5d20d..1417412204a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionMoveStringUp.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionMoveStringUp.java @@ -18,9 +18,9 @@ package org.eclipse.rse.ui.filters.actions; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.rse.ui.filters.SystemChangeFilterPane; @@ -41,12 +41,12 @@ public class SystemChangeFilterActionMoveStringUp extends SystemBaseAction public SystemChangeFilterActionMoveStringUp(SystemChangeFilterPane parentDialog) { super(SystemResources.ACTION_MOVEUP_LABEL,SystemResources.ACTION_MOVEUP_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID), null); allowOnMultipleSelection(false); this.parentDialog = parentDialog; setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORDER); - setHelp(SystemPlugin.HELPPREFIX+"dufr4000"); + setHelp(RSEUIPlugin.HELPPREFIX+"dufr4000"); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionPasteString.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionPasteString.java index c2e554afc5b..8331d784749 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionPasteString.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterActionPasteString.java @@ -17,8 +17,8 @@ package org.eclipse.rse.ui.filters.actions; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemContextMenuConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.rse.ui.filters.SystemChangeFilterPane; @@ -45,7 +45,7 @@ public class SystemChangeFilterActionPasteString extends SystemBaseAction allowOnMultipleSelection(false); this.parentDialog = parentDialog; setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE); - setHelp(SystemPlugin.HELPPREFIX+"dufr3000"); + setHelp(RSEUIPlugin.HELPPREFIX+"dufr3000"); } /** 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 d6a6fc5bd19..f013adfd42f 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,11 +17,11 @@ package org.eclipse.rse.ui.filters.actions; import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.IMenuManager; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.filters.ISystemFilterPoolManager; import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +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.SystemBaseSubMenuAction; @@ -52,7 +52,7 @@ public class SystemFilterCascadingNewFilterPoolReferenceAction public SystemFilterCascadingNewFilterPoolReferenceAction(Shell shell, ISystemFilterPoolReferenceManager refMgr) { super(SystemResources.ACTION_CASCADING_FILTERPOOL_NEWREFERENCE_LABEL, SystemResources.ACTION_CASCADING_FILTERPOOL_NEWREFERENCE_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTERPOOLREF_ID),shell); + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTERPOOLREF_ID),shell); setCreateMenuEachTime(false); setPopulateMenuEachTime(false); setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW); 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 22a180fabb2..3dee13c30f0 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,7 +22,6 @@ 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.SystemPlugin; import org.eclipse.rse.core.subsystems.util.ISubsystemConfigurationAdapter; import org.eclipse.rse.filters.ISystemFilter; import org.eclipse.rse.filters.ISystemFilterPool; @@ -31,6 +30,7 @@ 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; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.rse.ui.actions.SystemBaseCopyAction; @@ -220,14 +220,14 @@ public class SystemFilterCopyFilterAction extends SystemBaseCopyAction */ protected SystemMessage getCopyingMessage() { - return SystemPlugin.getPluginMessage(MSG_COPYFILTERS_PROGRESS); + return RSEUIPlugin.getPluginMessage(MSG_COPYFILTERS_PROGRESS); } /** * @see SystemBaseCopyAction#getCopyingMessage(String) */ protected SystemMessage getCopyingMessage(String oldName) { - return SystemPlugin.getPluginMessage(MSG_COPYFILTER_PROGRESS).makeSubstitution(oldName); + return RSEUIPlugin.getPluginMessage(MSG_COPYFILTER_PROGRESS).makeSubstitution(oldName); } /** 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 eb12df627c3..d3d152d077f 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,7 +22,6 @@ 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.SystemPlugin; import org.eclipse.rse.core.subsystems.util.ISubsystemConfigurationAdapter; import org.eclipse.rse.filters.ISystemFilterPool; import org.eclipse.rse.filters.ISystemFilterPoolManager; @@ -30,6 +29,7 @@ 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; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.rse.ui.actions.SystemBaseCopyAction; @@ -202,21 +202,21 @@ public class SystemFilterCopyFilterPoolAction extends SystemBaseCopyAction */ protected SystemMessage getCopyingMessage() { - return SystemPlugin.getPluginMessage(MSG_COPYFILTERPOOLS_PROGRESS); + return RSEUIPlugin.getPluginMessage(MSG_COPYFILTERPOOLS_PROGRESS); } /** * @see SystemBaseCopyAction#getCopyingMessage(String) */ protected SystemMessage getCopyingMessage(String oldName) { - return SystemPlugin.getPluginMessage(MSG_COPYFILTERPOOL_PROGRESS).makeSubstitution(oldName); + return RSEUIPlugin.getPluginMessage(MSG_COPYFILTERPOOL_PROGRESS).makeSubstitution(oldName); } /** * Return complete message */ public SystemMessage getCompletionMessage(Object targetContainer, String[] oldNames, String[] newNames) { - return SystemPlugin.getPluginMessage(MSG_COPYFILTERPOOL_COMPLETE).makeSubstitution(((ISystemFilterPoolManager)targetContainer).getName()); + return RSEUIPlugin.getPluginMessage(MSG_COPYFILTERPOOL_COMPLETE).makeSubstitution(((ISystemFilterPoolManager)targetContainer).getName()); } /** 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 0b6926f1f53..6accda0964e 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,7 +22,6 @@ 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.SystemPlugin; import org.eclipse.rse.core.subsystems.util.ISubsystemConfigurationAdapter; import org.eclipse.rse.filters.ISystemFilter; import org.eclipse.rse.filters.ISystemFilterPool; @@ -32,6 +31,7 @@ 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; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.rse.ui.actions.SystemBaseCopyAction; @@ -175,7 +175,7 @@ public class SystemFilterCopyFilterStringAction extends SystemBaseCopyAction ISystemFilterString match = newFilter.getSystemFilterString(oldName); if (match != null) { - SystemMessage msg = SystemPlugin.getPluginMessage(MSG_VALIDATE_FILTERSTRING_ALREADYEXISTS); + SystemMessage msg = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_FILTERSTRING_ALREADYEXISTS); msg.makeSubstitution(oldName, newFilter.getName()); SystemMessageDialog.displayErrorMessage(shell, msg); } @@ -269,14 +269,14 @@ public class SystemFilterCopyFilterStringAction extends SystemBaseCopyAction */ protected SystemMessage getCopyingMessage() { - return SystemPlugin.getPluginMessage(MSG_COPYFILTERSTRINGS_PROGRESS); + return RSEUIPlugin.getPluginMessage(MSG_COPYFILTERSTRINGS_PROGRESS); } /** * @see SystemBaseCopyAction#getCopyingMessage( String) */ protected SystemMessage getCopyingMessage(String oldName) { - return SystemPlugin.getPluginMessage(MSG_COPYFILTERSTRING_PROGRESS).makeSubstitution(oldName); + return RSEUIPlugin.getPluginMessage(MSG_COPYFILTERSTRING_PROGRESS).makeSubstitution(oldName); } /** 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 d052835d2ee..7cc5e212eff 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,13 +18,13 @@ package org.eclipse.rse.ui.filters.actions; import java.util.Iterator; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; 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.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemSortableSelection; import org.eclipse.rse.ui.actions.SystemBaseAction; @@ -45,7 +45,7 @@ public class SystemFilterMoveDownFilterAction extends SystemBaseAction public SystemFilterMoveDownFilterAction(Shell parent) { super(SystemResources.ACTION_MOVEDOWN_LABEL,SystemResources.ACTION_MOVEDOWN_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID), parent); allowOnMultipleSelection(true); setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORDER); 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 c596e26d092..7d8bdc34900 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,11 +18,11 @@ package org.eclipse.rse.ui.filters.actions; import java.util.Iterator; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.filters.ISystemFilterPoolReference; import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemSortableSelection; import org.eclipse.rse.ui.actions.SystemBaseAction; @@ -43,7 +43,7 @@ public class SystemFilterMoveDownFilterPoolReferenceAction extends SystemBaseAct public SystemFilterMoveDownFilterPoolReferenceAction(Shell parent) { super(SystemResources.ACTION_MOVEDOWN_LABEL,SystemResources.ACTION_MOVEDOWN_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID), parent); allowOnMultipleSelection(true); setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORDER); 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 08b6dcc6444..ffd557a0b47 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,7 +22,6 @@ 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.SystemPlugin; import org.eclipse.rse.core.subsystems.util.ISubsystemConfigurationAdapter; import org.eclipse.rse.filters.ISystemFilter; import org.eclipse.rse.filters.ISystemFilterPool; @@ -31,6 +30,7 @@ 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; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.rse.ui.actions.SystemBaseCopyAction; @@ -221,14 +221,14 @@ public class SystemFilterMoveFilterAction extends SystemBaseCopyAction */ protected SystemMessage getCopyingMessage() { - return SystemPlugin.getPluginMessage(MSG_MOVEFILTERS_PROGRESS); + return RSEUIPlugin.getPluginMessage(MSG_MOVEFILTERS_PROGRESS); } /** * @see SystemBaseCopyAction#getCopyingMessage( String) */ protected SystemMessage getCopyingMessage(String oldName) { - return SystemPlugin.getPluginMessage(MSG_MOVEFILTER_PROGRESS).makeSubstitution(oldName); + return RSEUIPlugin.getPluginMessage(MSG_MOVEFILTER_PROGRESS).makeSubstitution(oldName); } /** 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 f9a198d7a3d..28004d51afd 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,7 +22,6 @@ 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.SystemPlugin; import org.eclipse.rse.core.subsystems.util.ISubsystemConfigurationAdapter; import org.eclipse.rse.filters.ISystemFilterPool; import org.eclipse.rse.filters.ISystemFilterPoolManager; @@ -30,6 +29,7 @@ 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; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.rse.ui.actions.SystemBaseCopyAction; @@ -222,21 +222,21 @@ public class SystemFilterMoveFilterPoolAction extends SystemBaseCopyAction */ protected SystemMessage getCopyingMessage() { - return SystemPlugin.getPluginMessage(MSG_MOVEFILTERPOOLS_PROGRESS); + return RSEUIPlugin.getPluginMessage(MSG_MOVEFILTERPOOLS_PROGRESS); } /** * @see SystemBaseCopyAction#getCopyingMessage( String) */ protected SystemMessage getCopyingMessage(String oldName) { - return SystemPlugin.getPluginMessage(MSG_MOVEFILTERPOOL_PROGRESS).makeSubstitution(oldName); + return RSEUIPlugin.getPluginMessage(MSG_MOVEFILTERPOOL_PROGRESS).makeSubstitution(oldName); } /** * Return complete message */ public SystemMessage getCompletionMessage(Object targetContainer, String[] oldNames, String[] newNames) { - return SystemPlugin.getPluginMessage(MSG_MOVEFILTERPOOL_COMPLETE).makeSubstitution(((ISystemFilterPoolManager)targetContainer).getName()); + return RSEUIPlugin.getPluginMessage(MSG_MOVEFILTERPOOL_COMPLETE).makeSubstitution(((ISystemFilterPoolManager)targetContainer).getName()); } /** 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 549bc02fde4..f61955509fb 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,7 +22,6 @@ 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.SystemPlugin; import org.eclipse.rse.core.subsystems.util.ISubsystemConfigurationAdapter; import org.eclipse.rse.filters.ISystemFilter; import org.eclipse.rse.filters.ISystemFilterPool; @@ -32,6 +31,7 @@ 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; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.rse.ui.actions.SystemBaseCopyAction; @@ -175,7 +175,7 @@ public class SystemFilterMoveFilterStringAction extends SystemBaseCopyAction ISystemFilterString match = newFilter.getSystemFilterString(oldName); if (match != null) { - SystemMessage msg = SystemPlugin.getPluginMessage(MSG_VALIDATE_FILTERSTRING_ALREADYEXISTS); + SystemMessage msg = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_FILTERSTRING_ALREADYEXISTS); msg.makeSubstitution(oldName, newFilter.getName()); SystemMessageDialog.displayErrorMessage(shell, msg); @@ -270,14 +270,14 @@ public class SystemFilterMoveFilterStringAction extends SystemBaseCopyAction */ protected SystemMessage getCopyingMessage() { - return SystemPlugin.getPluginMessage(MSG_MOVEFILTERSTRINGS_PROGRESS); + return RSEUIPlugin.getPluginMessage(MSG_MOVEFILTERSTRINGS_PROGRESS); } /** * @see SystemBaseCopyAction#getCopyingMessage( String) */ protected SystemMessage getCopyingMessage(String oldName) { - return SystemPlugin.getPluginMessage(MSG_MOVEFILTERSTRING_PROGRESS).makeSubstitution(oldName); + return RSEUIPlugin.getPluginMessage(MSG_MOVEFILTERSTRING_PROGRESS).makeSubstitution(oldName); } /** 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 ac3e0ee72b7..e9583c04415 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,13 +18,13 @@ package org.eclipse.rse.ui.filters.actions; import java.util.Iterator; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; 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.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemSortableSelection; import org.eclipse.rse.ui.actions.SystemBaseAction; @@ -44,7 +44,7 @@ public class SystemFilterMoveUpFilterAction extends SystemBaseAction public SystemFilterMoveUpFilterAction(Shell parent) { super(SystemResources.ACTION_MOVEUP_LABEL,SystemResources.ACTION_MOVEUP_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID), parent); allowOnMultipleSelection(true); setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORDER); 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 e00d89ee30d..f1402e8a909 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,11 +18,11 @@ package org.eclipse.rse.ui.filters.actions; import java.util.Iterator; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.filters.ISystemFilterPoolReference; import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemSortableSelection; import org.eclipse.rse.ui.actions.SystemBaseAction; @@ -43,7 +43,7 @@ public class SystemFilterMoveUpFilterPoolReferenceAction extends SystemBaseActio public SystemFilterMoveUpFilterPoolReferenceAction(Shell parent) { super(SystemResources.ACTION_MOVEUP_LABEL,SystemResources.ACTION_MOVEUP_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID), parent); allowOnMultipleSelection(true); setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORDER); 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 c15acb6b15f..dd8bd766b6b 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,13 +16,13 @@ package org.eclipse.rse.ui.filters.actions; import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.rse.core.SystemPlugin; 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.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.ISystemWizardAction; import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement; @@ -61,7 +61,7 @@ public class SystemFilterNewFilterPoolAction SystemFilterWorkWithFilterPoolsDialog wwdialog) { super(parent, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTERPOOL_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTERPOOL_ID), SystemResources.ACTION_NEWFILTERPOOL_LABEL, SystemResources.ACTION_NEWFILTERPOOL_TOOLTIP); this.wwdialog = wwdialog; allowOnMultipleSelection(false); 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 00b1a287064..aed24a03a6e 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,10 +17,10 @@ package org.eclipse.rse.ui.filters.actions; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.filters.ISystemFilterPool; import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.swt.widgets.Shell; @@ -40,7 +40,7 @@ public class SystemFilterPoolReferenceSelectAction extends SystemBaseAction */ public SystemFilterPoolReferenceSelectAction(Shell parent, ISystemFilterPool pool, ISystemFilterPoolReferenceManager refMgr) { - super(pool.getName(), SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTERPOOLREF_ID), parent); + super(pool.getName(), RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTERPOOLREF_ID), parent); this.pool = pool; this.refMgr = refMgr; //setChecked(false); 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 fa132e15cf9..0fa1ab9dfbf 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,11 +18,11 @@ package org.eclipse.rse.ui.filters.actions; import java.util.Iterator; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.filters.ISystemFilterPoolReference; import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.swt.widgets.Shell; @@ -43,7 +43,7 @@ public class SystemFilterRemoveFilterPoolReferenceAction public SystemFilterRemoveFilterPoolReferenceAction(Shell parent) { super(SystemResources.ACTION_RMVFILTERPOOLREF_LABEL,SystemResources.ACTION_RMVFILTERPOOLREF_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_DELETEREF_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_DELETEREF_ID), parent); allowOnMultipleSelection(true); setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE); 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 fc96b6413e2..fe2b0bb75da 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,13 +18,13 @@ package org.eclipse.rse.ui.filters.actions; import java.util.Vector; import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.rse.core.SystemPlugin; 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.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement; import org.eclipse.rse.ui.dialogs.SystemSimpleSelectDialog; @@ -79,12 +79,12 @@ public class SystemFilterSelectFilterPoolsAction public SystemFilterSelectFilterPoolsAction(Shell parent) { super(parent, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SELECTFILTERPOOLS_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SELECTFILTERPOOLS_ID), SystemResources.ACTION_SELECTFILTERPOOLS_LABEL, SystemResources.ACTION_SELECTFILTERPOOLS_TOOLTIP); setContextMenuGroup(ISystemContextMenuConstants.GROUP_CHANGE); // set default help for action and dialog - setHelp(SystemPlugin.HELPPREFIX + "actn0043"); - setDialogHelp(SystemPlugin.HELPPREFIX + "dsfp0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "actn0043"); + setDialogHelp(RSEUIPlugin.HELPPREFIX + "dsfp0000"); } /** * Constructor when given the translated action label @@ -94,8 +94,8 @@ public class SystemFilterSelectFilterPoolsAction super(parent, title); setContextMenuGroup(ISystemContextMenuConstants.GROUP_CHANGE); // set default help for action and dialog - setHelp(SystemPlugin.HELPPREFIX + "actn0043"); - setDialogHelp(SystemPlugin.HELPPREFIX + "dsfp0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "actn0043"); + setDialogHelp(RSEUIPlugin.HELPPREFIX + "dsfp0000"); } @@ -107,8 +107,8 @@ public class SystemFilterSelectFilterPoolsAction super(parent, title, tooltip); setContextMenuGroup(ISystemContextMenuConstants.GROUP_CHANGE); // set default help for action and dialog - setHelp(SystemPlugin.HELPPREFIX + "actn0043"); - setDialogHelp(SystemPlugin.HELPPREFIX + "dsfp0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "actn0043"); + setDialogHelp(RSEUIPlugin.HELPPREFIX + "dsfp0000"); } 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 b01b699d5c4..42df0780366 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,11 +16,11 @@ package org.eclipse.rse.ui.filters.actions; import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.filters.ISystemFilterPoolManager; import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement; import org.eclipse.rse.ui.filters.SystemFilterPoolDialogInterface; @@ -48,13 +48,13 @@ public class SystemFilterWorkWithFilterPoolsAction public SystemFilterWorkWithFilterPoolsAction(Shell parent) { super(parent, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_WORKWITHFILTERPOOLS_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_WORKWITHFILTERPOOLS_ID), SystemResources.ACTION_WORKWITH_FILTERPOOLS_LABEL, SystemResources.ACTION_WORKWITH_FILTERPOOLS_TOOLTIP); setContextMenuGroup(ISystemContextMenuConstants.GROUP_WORKWITH); allowOnMultipleSelection(false); // set default action and dialog help - setHelp(SystemPlugin.HELPPREFIX + "actn0044"); - setDialogHelp(SystemPlugin.HELPPREFIX + "dwfp0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "actn0044"); + setDialogHelp(RSEUIPlugin.HELPPREFIX + "dwfp0000"); } /** * Constructor when default label desired, and you want to choose between @@ -63,7 +63,7 @@ public class SystemFilterWorkWithFilterPoolsAction public SystemFilterWorkWithFilterPoolsAction(Shell parent, boolean cascadingAction) { super(parent, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_WORKWITHFILTERPOOLS_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_WORKWITHFILTERPOOLS_ID), cascadingAction ? SystemResources.ACTION_WORKWITH_FILTERPOOLS_LABEL : SystemResources.ACTION_WORKWITH_WWFILTERPOOLS_LABEL, cascadingAction ? SystemResources.ACTION_WORKWITH_FILTERPOOLS_TOOLTIP : SystemResources.ACTION_WORKWITH_WWFILTERPOOLS_TOOLTIP ); @@ -73,8 +73,8 @@ public class SystemFilterWorkWithFilterPoolsAction setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE); allowOnMultipleSelection(false); // set default action and dialog help - setHelp(SystemPlugin.HELPPREFIX + "actn0044"); - setDialogHelp(SystemPlugin.HELPPREFIX + "dwfp0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "actn0044"); + setDialogHelp(RSEUIPlugin.HELPPREFIX + "dwfp0000"); } /** * Constructor when given the translated action label @@ -85,8 +85,8 @@ public class SystemFilterWorkWithFilterPoolsAction setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE); allowOnMultipleSelection(false); // set default action and dialog help - setHelp(SystemPlugin.HELPPREFIX + "actn0044"); - setDialogHelp(SystemPlugin.HELPPREFIX + "dwfp0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "actn0044"); + setDialogHelp(RSEUIPlugin.HELPPREFIX + "dwfp0000"); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterWorkWithFilterPoolsRefreshAllAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterWorkWithFilterPoolsRefreshAllAction.java index e82b008a02f..92ee88c23e0 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterWorkWithFilterPoolsRefreshAllAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterWorkWithFilterPoolsRefreshAllAction.java @@ -19,9 +19,9 @@ package org.eclipse.rse.ui.filters.actions; //import com.ibm.etools.systems.model.impl.*; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.TreeViewer; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.swt.widgets.Shell; @@ -43,7 +43,7 @@ public class SystemFilterWorkWithFilterPoolsRefreshAllAction extends SystemBaseA public SystemFilterWorkWithFilterPoolsRefreshAllAction(TreeViewer viewer, Shell parent) { super(SystemResources.ACTION_REFRESH_ALL_LABEL,SystemResources.ACTION_REFRESH_ALL_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptorFromIDE(ISystemIconConstants.ICON_IDE_REFRESH_ID), + RSEUIPlugin.getDefault().getImageDescriptorFromIDE(ISystemIconConstants.ICON_IDE_REFRESH_ID), parent); this.viewer = viewer; allowOnMultipleSelection(true); 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 697017fda8a..2583349fb25 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,7 +19,6 @@ import java.util.Vector; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.wizard.IWizard; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.filters.ISystemFilter; import org.eclipse.rse.filters.ISystemFilterContainer; @@ -32,6 +31,7 @@ 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; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseWizardAction; import org.eclipse.rse.ui.filters.SystemFilterStringEditPane; @@ -98,7 +98,7 @@ public class SystemNewFilterAction public SystemNewFilterAction(Shell shell, ISystemFilterPool parentPool) { this(shell, parentPool, SystemResources.ACTION_NEWFILTER_LABEL, SystemResources.ACTION_NEWFILE_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTER_ID), false); + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTER_ID), false); } // ------------------------ @@ -360,7 +360,7 @@ public class SystemNewFilterAction if (editPane != null) wizard.setFilterStringEditPane(editPane); ISystemFilterPoolReferenceManagerProvider provider = getSystemFilterPoolReferenceManagerProvider(); - //SystemPlugin.logDebugMessage(this.getClass().getName(),"Inside createWizard. null? " + (provider==null)); + //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"Inside createWizard. null? " + (provider==null)); wizard.setSystemFilterPoolReferenceManagerProvider(provider); configureNewFilterWizard(wizard); return wizard; 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 edad4280b59..9a9e8990f96 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,11 +16,11 @@ package org.eclipse.rse.ui.filters.dialogs; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider; import org.eclipse.rse.filters.ISystemFilterPoolReferenceManagerProvider; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemPageCompleteListener; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.dialogs.SystemPromptDialog; import org.eclipse.rse.ui.filters.ISystemChangeFilterPaneEditPaneSupplier; @@ -69,7 +69,7 @@ public class SystemChangeFilterDialog extends SystemPromptDialog */ protected void setHelp() { - setHelp(SystemPlugin.HELPPREFIX+"dufr0000"); + setHelp(RSEUIPlugin.HELPPREFIX+"dufr0000"); } // INPUT/CONFIGURATION 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 8bf37f441a7..95d0289049e 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,12 +17,12 @@ package org.eclipse.rse.ui.filters.dialogs; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.filters.ISystemFilterPool; import org.eclipse.rse.filters.ISystemFilterPoolManager; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.filters.SystemFilterPoolDialogOutputs; import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction; @@ -50,7 +50,7 @@ public class SystemFilterNewFilterPoolWizard public SystemFilterNewFilterPoolWizard() { this(SystemResources.RESID_NEWFILTERPOOL_TITLE, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTERPOOLWIZARD_ID)); + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTERPOOLWIZARD_ID)); } /** * Constructor @@ -137,10 +137,10 @@ public class SystemFilterNewFilterPoolWizard } catch (Exception exc) { - //SystemPlugin.logError("Error in performFinish of filter pool wizard!", exc); + //RSEUIPlugin.logError("Error in performFinish of filter pool wizard!", exc); //System.out.println("Error in performFinish of filter pool wizard!"); //exc.printStackTrace(); - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_OCCURRED); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_OCCURRED); msg.makeSubstitution(exc); SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), msg); msgDlg.openWithDetails(); 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 2e4758b4b76..5b59bc2753a 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,7 +27,6 @@ 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.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.filters.ISystemFilterPool; import org.eclipse.rse.filters.ISystemFilterPoolManager; @@ -37,6 +36,7 @@ import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.ui.ISystemDeleteTarget; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.ISystemRenameTarget; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.actions.ISystemAction; @@ -345,7 +345,7 @@ public class SystemFilterWorkWithFilterPoolsDialog public boolean close() { - //SystemPlugin.getDefault().getSystemRegistry().removeSystemResourceChangeListener(this); + //RSEUIPlugin.getDefault().getSystemRegistry().removeSystemResourceChangeListener(this); return super.close(); } /** @@ -434,13 +434,13 @@ public class SystemFilterWorkWithFilterPoolsDialog tree.refresh(parent); } catch (Exception exc) { - //SystemMessage.displayExceptionMessage(getShell(),SystemPlugin.getResourceBundle(), + //SystemMessage.displayExceptionMessage(getShell(),RSEUIPlugin.getResourceBundle(), // ISystemMessages.MSG_EXCEPTION_DELETING,exc, // pool.getName()); SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), - SystemPlugin.getPluginMessage(MSG_EXCEPTION_DELETING).makeSubstitution(pool.getName(),exc)); + RSEUIPlugin.getPluginMessage(MSG_EXCEPTION_DELETING).makeSubstitution(pool.getName(),exc)); msgDlg.open(); - //SystemPlugin.logError("Error deleting filter pool in workwith dialog",exc); + //RSEUIPlugin.logError("Error deleting filter pool in workwith dialog",exc); } return ok; } @@ -508,13 +508,13 @@ public class SystemFilterWorkWithFilterPoolsDialog } catch (Exception exc) { - //SystemMessage.displayExceptionMessage(getShell(),SystemPlugin.getResourceBundle(), + //SystemMessage.displayExceptionMessage(getShell(),RSEUIPlugin.getResourceBundle(), // ISystemMessages.MSG_EXCEPTION_RENAMING,exc, // pool.getName()); SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), - SystemPlugin.getPluginMessage(MSG_EXCEPTION_RENAMING).makeSubstitution(pool.getName(),exc)); + RSEUIPlugin.getPluginMessage(MSG_EXCEPTION_RENAMING).makeSubstitution(pool.getName(),exc)); msgDlg.open(); - //SystemPlugin.logError("Error renaming filter pool in workwith dialog",exc); + //RSEUIPlugin.logError("Error renaming filter pool in workwith dialog",exc); } return ok; } @@ -572,7 +572,7 @@ public class SystemFilterWorkWithFilterPoolsDialog if (inputObj instanceof ISubSystem) { ISubSystem ss = (ISubSystem)inputObj; - SystemMessage msg = SystemPlugin.getPluginMessage(MSG_FILTERPOOL_CREATED); + SystemMessage msg = RSEUIPlugin.getPluginMessage(MSG_FILTERPOOL_CREATED); msg.makeSubstitution("'"+pool.getName()+"'", "'"+ss.getName()+"'"); if (shell.isDisposed() || !shell.isVisible()) shell = getShell(); 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 ceae6ad2944..c76acd45991 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 @@ -21,7 +21,6 @@ import java.util.Vector; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.filters.ISystemFilter; import org.eclipse.rse.filters.ISystemFilterContainer; import org.eclipse.rse.filters.ISystemFilterContainerReference; @@ -37,6 +36,7 @@ import org.eclipse.rse.filters.ISystemFilterReference; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.filters.SystemFilterStringEditPane; import org.eclipse.rse.ui.messages.SystemMessageDialog; @@ -114,7 +114,7 @@ public class SystemNewFilterWizard public SystemNewFilterWizard(ISystemFilterPool parentPool) { this(new SystemNewFilterWizardConfigurator(), - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTERWIZARD_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTERWIZARD_ID), parentPool); } /** @@ -260,7 +260,7 @@ public class SystemNewFilterWizard public void setSystemFilterPoolReferenceManagerProvider(ISystemFilterPoolReferenceManagerProvider provider) { this.provider = provider; - //SystemPlugin.logDebugMessage(this.getClass().getName(),"Inside setSystemFilterPoolReferenceManagerProvider. null? " + (provider==null)); + //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"Inside setSystemFilterPoolReferenceManagerProvider. null? " + (provider==null)); } /** * Set the verbage to show on the final page. By default, it shows a tip about creating multiple @@ -525,7 +525,7 @@ public class SystemNewFilterWizard */ } catch (Exception exc) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_OCCURRED); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_OCCURRED); msg.makeSubstitution(exc); SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), msg); msgDlg.openWithDetails(); @@ -656,7 +656,7 @@ public class SystemNewFilterWizard newFilter = fpMgr.createSystemFilter(filterParent,aliasName,filterStrings,type); //} catch (Exception exc) //{ - //SystemPlugin.logError("Exception in createNewFilter in SystemFilterAbstractNewFilterWizard. ",); + //RSEUIPlugin.logError("Exception in createNewFilter in SystemFilterAbstractNewFilterWizard. ",); //System.out.println("Exception in createNewFilter in SystemFilterAbstractNewFilterWizard: "+exc.getMessage()); //exc.printStackTrace(); //} diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardConfigurator.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardConfigurator.java index 07499e52d28..990b0491b3a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardConfigurator.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardConfigurator.java @@ -16,8 +16,8 @@ package org.eclipse.rse.ui.filters.dialogs; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; /** @@ -54,7 +54,7 @@ public class SystemNewFilterWizardConfigurator this.page1Description = SystemResources.RESID_NEWFILTER_PAGE1_DESCRIPTION; this.page3Tip1 = SystemResources.RESID_NEWFILTER_PAGE3_STRINGS_VERBAGE; this.page3Tip2 = SystemResources.RESID_NEWFILTER_PAGE3_POOLS_VERBAGE; - this.page2Help = SystemPlugin.HELPPREFIX + "nfp20000"; + this.page2Help = RSEUIPlugin.HELPPREFIX + "nfp20000"; } /** @@ -85,7 +85,7 @@ public class SystemNewFilterWizardConfigurator * public String getPage1HelpID() { - return SystemPlugin.HELPPREFIX + "nfp10000"; + return RSEUIPlugin.HELPPREFIX + "nfp10000"; }*/ /** 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 59b254d9e02..a2be9761e3d 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 @@ -87,7 +87,7 @@ public class SystemUnNamedFilterDialog extends SystemPromptDialog public void setSystemFilterPoolReferenceManagerProvider(ISystemFilterPoolReferenceManagerProvider provider) { this.provider = provider; - //SystemPlugin.logDebugMessage(this.getClass().getName(),"Inside setSystemFilterPoolReferenceManagerProvider. null? " + (provider==null)); + //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"Inside setSystemFilterPoolReferenceManagerProvider. null? " + (provider==null)); } /** * Specify an edit pane that prompts the user for the contents of a filter string. diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/internal/RSESystemTypeAdapterFactory.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/internal/RSESystemTypeAdapterFactory.java new file mode 100644 index 00000000000..e137d8e778b --- /dev/null +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/internal/RSESystemTypeAdapterFactory.java @@ -0,0 +1,42 @@ +/******************************************************************************** + * 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.ui.internal; + +import org.eclipse.core.runtime.IAdapterFactory; +import org.eclipse.rse.core.IRSESystemType; +import org.eclipse.rse.ui.RSESystemTypeAdapter; + +public class RSESystemTypeAdapterFactory implements IAdapterFactory { + + private RSESystemTypeAdapter adapter = new RSESystemTypeAdapter(); + + public RSESystemTypeAdapterFactory() { + super(); + } + + public Object getAdapter(Object adaptableObject, Class adapterType) { + if (adaptableObject instanceof IRSESystemType) { + return adapter; + } + else { + return null; + } + } + + public Class[] getAdapterList() { + return new Class[] {IRSESystemType.class}; + } +} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/internal/RSEUIRegistry.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/internal/RSEUIRegistry.java new file mode 100644 index 00000000000..84120367349 --- /dev/null +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/internal/RSEUIRegistry.java @@ -0,0 +1,51 @@ +/******************************************************************************** + * 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.ui.internal; + +import org.eclipse.rse.ui.IRSEUIRegistry; + +public class RSEUIRegistry implements IRSEUIRegistry { + + // the singleton instance + private static RSEUIRegistry instance; + + /** + * Constructor. + */ + public RSEUIRegistry() { + super(); + init(); + } + + /** + * Initializes the registry. This should only be called from the constructor. + */ + private void init() { + } + + /** + * Returns the singleton instance of the registry. + * @return the singleton instance + */ + public static final RSEUIRegistry getDefault() { + + if (instance == null) { + instance = new RSEUIRegistry(); + } + + return instance; + } +} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemDialogPageMessageLine.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemDialogPageMessageLine.java index d862bcaa516..58491f1e5d1 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemDialogPageMessageLine.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemDialogPageMessageLine.java @@ -20,9 +20,9 @@ import org.eclipse.jface.dialogs.DialogPage; import org.eclipse.jface.dialogs.IMessageProvider; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.swt.custom.CLabel; import org.eclipse.swt.events.MouseEvent; @@ -230,7 +230,7 @@ public class SystemDialogPageMessageLine implements ISystemMessageLine, MouseLis * Convenience method to set an error message from an exception */ public void setErrorMessage(Throwable exc) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED); msg.makeSubstitution(exc); setErrorMessage(msg); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageDialog.java index 780fa2be892..95c795ea4a1 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageDialog.java @@ -24,13 +24,15 @@ import org.eclipse.core.runtime.MultiStatus; import org.eclipse.core.runtime.Status; import org.eclipse.jface.dialogs.ErrorDialog; import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.services.clientserver.messages.IndicatorException; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; +import org.eclipse.rse.ui.SystemResources; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Point; @@ -40,7 +42,9 @@ import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; @@ -48,7 +52,7 @@ import org.eclipse.swt.widgets.Text; /** */ -public class SystemMessageDialog extends ErrorDialog { +public class SystemMessageDialog extends ErrorDialog implements Listener { /** * Reserve room for this many list items. @@ -145,7 +149,15 @@ public class SystemMessageDialog extends ErrorDialog { /** * whether or not to open the dialog with the yes/no/cancel buttons */ - private boolean yesNoCancelButtons=false; + private boolean yesNoCancelButtons=false; + + protected boolean noShowAgainOption; + protected Button noShowAgainButton; + + // preference stuff for option to not show the dialog again + protected IPreferenceStore prefStore; + protected String prefId; + protected boolean prefValAsSelected; /** * Creates an error dialog. @@ -300,6 +312,15 @@ public class SystemMessageDialog extends ErrorDialog { data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH); messageArea.setLayoutData(data); } + + // if user wants the option to not show the dialog again + if (noShowAgainOption) { + Label l = new Label(composite, SWT.NONE); + l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER, GridData.VERTICAL_ALIGN_CENTER)); + noShowAgainButton = createNoShowAgainButton(composite); + GridData data = new GridData(SWT.FILL, SWT.CENTER, true, true); + noShowAgainButton.setLayoutData(data); + } // composite.pack(true); return composite; @@ -598,7 +619,7 @@ public class SystemMessageDialog extends ErrorDialog { */ public static void displayErrorMessage(Shell shell, String msgText) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_E); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_E); msg.makeSubstitution(msgText); displayErrorMessage(shell,msg); } @@ -608,7 +629,7 @@ public class SystemMessageDialog extends ErrorDialog { */ public static void displayMessage(Shell shell, String msgText) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_I); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_I); msg.makeSubstitution(msgText); displayErrorMessage(shell,msg); } @@ -629,7 +650,7 @@ public class SystemMessageDialog extends ErrorDialog { */ public static void displayHostErrorMessage(Shell shell, String hostMsg) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_E); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_E); msg.makeSubstitution(hostMsg); SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg); msgDlg.open(); @@ -641,7 +662,7 @@ public class SystemMessageDialog extends ErrorDialog { */ public static void displayHostErrorMessage(Shell shell, String hostMsg, String levelTwo) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_E_HELP); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_E_HELP); msg.makeSubstitution(hostMsg,levelTwo); SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg); msgDlg.open(); @@ -652,7 +673,7 @@ public class SystemMessageDialog extends ErrorDialog { */ public static void displayHostWarningMessage(Shell shell, String hostMsg) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_W); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_W); msg.makeSubstitution(hostMsg); SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg); msgDlg.open(); @@ -664,7 +685,7 @@ public class SystemMessageDialog extends ErrorDialog { */ public static void displayHostWarningMessage(Shell shell, String hostMsg, String levelTwo) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_W_HELP); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_W_HELP); msg.makeSubstitution(hostMsg,levelTwo); SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg); msgDlg.open(); @@ -690,7 +711,7 @@ public class SystemMessageDialog extends ErrorDialog { */ public static SystemMessage getExceptionMessage(Shell shell, Exception exc) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_OCCURRED); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_OCCURRED); msg.makeSubstitution(exc); return msg; } @@ -724,4 +745,60 @@ public class SystemMessageDialog extends ErrorDialog { return yes; } + /** + * Set option to not show this dialog again and specify the preference that should be set + * according to whether the user selects to show the dialog again or no. The caller can + * query this preference to find out what the user selection is. + * @param noShowAgainOption true to show the option in the dialog, false to not show it. + * @param prefStore the preference store. + * @param prefId the preference id for which a boolean value will be stored according to the user's selection. + * @param prefValAsSelected whether to mirror the user selection in the preference. If this is set to + * true, then the value stored in the preference is true if the user selects the option, + * and false if the user does not select the option. If this is set to false, then the + * value stored in the preference will be false if the user selects the option, and true + * if the user does not select the option + */ + public void setNoShowAgainOption(boolean noShowAgainOption, IPreferenceStore prefStore, String prefId, boolean prefValAsSelected) { + this.noShowAgainOption = noShowAgainOption; + this.prefStore = prefStore; + this.prefId = prefId; + this.prefValAsSelected = prefValAsSelected; + } + + /** + * Creates a button to allow option to not show this dialog again. + * @return the button that allows option to not show this dialog again. + */ + protected Button createNoShowAgainButton(Composite c) { + Button b = new Button(c, SWT.CHECK); + b.setText(SystemResources.RESID_DO_NOT_SHOW_MESSAGE_AGAIN_LABEL); + b.setToolTipText(SystemResources.RESID_DO_NOT_SHOW_MESSAGE_AGAIN_TOOLTIP); + b.addListener(SWT.Selection, this); + return b; + } + + /** + * Handles events generated by controls on this page. + * Should be overridden by child. + * Only public because of interface requirement! + */ + public void handleEvent(Event e) + { + if (e.type == SWT.Selection) { + + if (e.widget == noShowAgainButton) { + boolean isNoShowSelected = noShowAgainButton.getSelection(); + + if ((prefStore != null) && (prefId != null)) { + + if (prefValAsSelected) { + prefStore.setValue(prefId, isNoShowSelected); + } + else { + prefStore.setValue(prefId, !isNoShowSelected); + } + } + } + } + } } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageLine.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageLine.java index e4e3eb861b2..1aa045ece59 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageLine.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageLine.java @@ -20,11 +20,11 @@ import java.util.Stack; import org.eclipse.jface.resource.ColorRegistry; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.ISystemThemeConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.swt.SWT; import org.eclipse.swt.accessibility.AccessibleAdapter; @@ -282,7 +282,7 @@ public class SystemMessageLine id = isError() ? ISystemMessages.MSG_GENERIC_E_HELP : ISystemMessages.MSG_GENERIC_I_HELP; data = new Object[] {text1, text2}; } - SystemMessage result = SystemPlugin.getPluginMessage(id, data); + SystemMessage result = RSEUIPlugin.getPluginMessage(id, data); return result; } @@ -359,7 +359,7 @@ public class SystemMessageLine widget.setBackground(parent.getBackground()); moreButton = new Button(this, SWT.NONE); - moreButton.setImage(SystemPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_HELP_ID)); + moreButton.setImage(RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_HELP_ID)); moreButton.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false)); moreButton.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { @@ -477,7 +477,7 @@ public class SystemMessageLine */ public void setErrorMessage(Throwable throwable) { - SystemMessage message = SystemPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED); + SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED); message.makeSubstitution(throwable); setErrorMessage(message); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenUtil.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenUtil.java index 86f7cca955e..163c3f10924 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenUtil.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenUtil.java @@ -24,7 +24,7 @@ import java.util.List; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IExtensionRegistry; import org.eclipse.core.runtime.Platform; -import org.eclipse.rse.core.SystemPlugin; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -88,7 +88,7 @@ public class SystemQuickOpenUtil { if (pageDescriptors == null) { IExtensionRegistry registry = Platform.getExtensionRegistry(); - IConfigurationElement[] elements = registry.getConfigurationElementsFor(SystemPlugin.PLUGIN_ID, QUICK_OPEN_PAGE_EXTENSION_POINT); + IConfigurationElement[] elements = registry.getConfigurationElementsFor(RSEUIPlugin.PLUGIN_ID, QUICK_OPEN_PAGE_EXTENSION_POINT); pageDescriptors = createQuickOpenPageDescriptors(elements); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemJobRunnableContext.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemJobRunnableContext.java index 39a92ab40a5..095b7b4162a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemJobRunnableContext.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemJobRunnableContext.java @@ -30,7 +30,7 @@ import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.action.IAction; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IWorkbenchSite; import org.eclipse.ui.progress.IProgressConstants; @@ -223,7 +223,7 @@ public final class SystemJobRunnableContext implements ISystemRunnableContext { } // return an error status - return new Status(IStatus.ERROR, SystemPlugin.getDefault().getSymbolicName(), 0, msg, target); + return new Status(IStatus.ERROR, RSEUIPlugin.getDefault().getSymbolicName(), 0, msg, target); } catch (InterruptedException e) { return Status.OK_STATUS; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/AbstractSystemSubSystemPropertyPageCoreForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/AbstractSystemSubSystemPropertyPageCoreForm.java index badc89e9ba7..1d820ed97e8 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/AbstractSystemSubSystemPropertyPageCoreForm.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/AbstractSystemSubSystemPropertyPageCoreForm.java @@ -18,11 +18,11 @@ package org.eclipse.rse.ui.propertypages; import java.util.ResourceBundle; import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.dialogs.SystemPromptDialog; @@ -66,7 +66,7 @@ public abstract class AbstractSystemSubSystemPropertyPageCoreForm callerInstanceOfWizardPage = (caller instanceof WizardPage); callerInstanceOfSystemPromptDialog = (caller instanceof SystemPromptDialog); callerInstanceOfPropertyPage = (caller instanceof PropertyPage); - SystemPlugin sp = SystemPlugin.getDefault(); + RSEUIPlugin sp = RSEUIPlugin.getDefault(); } /** * Get the input element diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/RemoteSystemsPreferencePage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/RemoteSystemsPreferencePage.java index 5b5ac719b17..26fd955b0a6 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/RemoteSystemsPreferencePage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/RemoteSystemsPreferencePage.java @@ -23,12 +23,14 @@ import java.util.StringTokenizer; import org.eclipse.jface.preference.FieldEditorPreferencePage; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.util.PropertyChangeEvent; -import org.eclipse.rse.core.SystemPlugin; -import org.eclipse.rse.core.SystemType; +import org.eclipse.rse.core.IRSESystemType; +import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.internal.model.SystemPreferenceChangeEvent; import org.eclipse.rse.model.ISystemPreferenceChangeEvents; import org.eclipse.rse.ui.ISystemPreferencesConstants; import org.eclipse.rse.ui.Mnemonics; +import org.eclipse.rse.ui.RSESystemTypeAdapter; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemConnectionForm; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; @@ -71,7 +73,7 @@ public class RemoteSystemsPreferencePage { super(GRID); setTitle(SystemResources.RESID_PREF_ROOT_PAGE); - setPreferenceStore(SystemPlugin.getDefault().getPreferenceStore()); + setPreferenceStore(RSEUIPlugin.getDefault().getPreferenceStore()); setDescription(SystemResources.RESID_PREF_ROOT_TITLE); } /** @@ -91,7 +93,7 @@ public class RemoteSystemsPreferencePage SystemComboBoxFieldEditor systemTypeEditor = new SystemComboBoxFieldEditor( ISystemPreferencesConstants.SYSTEMTYPE, SystemResources.RESID_PREF_SYSTEMTYPE_PREFIX_LABEL, - SystemPlugin.getDefault().getSystemTypeNames(), + RSECorePlugin.getDefault().getRegistry().getSystemTypeNames(), true, // readonly getFieldEditorParent() ); @@ -188,7 +190,7 @@ public class RemoteSystemsPreferencePage (new Mnemonics()).setOnPreferencePage(true).setMnemonics(getFieldEditorParent()); // set help - SystemWidgetHelpers.setCompositeHelp(getFieldEditorParent(), SystemPlugin.HELPPREFIX+"rsep0000"); + SystemWidgetHelpers.setCompositeHelp(getFieldEditorParent(), RSEUIPlugin.HELPPREFIX+"rsep0000"); } // --------------------------------------------------------- @@ -199,7 +201,7 @@ public class RemoteSystemsPreferencePage */ public static String[] getActiveProfiles() { - IPreferenceStore store = SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore(); return parseStrings(store.getString(ISystemPreferencesConstants.ACTIVEUSERPROFILES)); } @@ -208,7 +210,7 @@ public class RemoteSystemsPreferencePage */ public static void setActiveProfiles(String[] newProfileNames) { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); store.setValue(ISystemPreferencesConstants.ACTIVEUSERPROFILES, makeString(newProfileNames)); savePreferenceStore(); } @@ -218,7 +220,7 @@ public class RemoteSystemsPreferencePage */ public static String[] getConnectionNamesOrder() { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); return parseStrings(store.getString(ISystemPreferencesConstants.ORDER_CONNECTIONS)); } /** @@ -226,7 +228,7 @@ public class RemoteSystemsPreferencePage */ public static void setConnectionNamesOrder(String[] newConnectionNamesOrder) { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); store.setValue(ISystemPreferencesConstants.ORDER_CONNECTIONS, makeString(newConnectionNamesOrder)); savePreferenceStore(); } @@ -235,7 +237,7 @@ public class RemoteSystemsPreferencePage */ public static boolean getShowFilterPoolsPreference() { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); return store.getBoolean(ISystemPreferencesConstants.SHOWFILTERPOOLS); } /** @@ -243,7 +245,7 @@ public class RemoteSystemsPreferencePage */ public static void setShowFilterPoolsPreference(boolean show) { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); store.setValue(ISystemPreferencesConstants.SHOWFILTERPOOLS,show); savePreferenceStore(); } @@ -253,7 +255,7 @@ public class RemoteSystemsPreferencePage */ public static boolean getShowNewConnectionPromptPreference() { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); boolean value = store.getBoolean(ISystemPreferencesConstants.SHOWNEWCONNECTIONPROMPT); return value; } @@ -262,7 +264,7 @@ public class RemoteSystemsPreferencePage */ public static void setShowNewConnectionPromptPreference(boolean show) { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); store.setValue(ISystemPreferencesConstants.SHOWNEWCONNECTIONPROMPT,show); savePreferenceStore(); } @@ -272,7 +274,7 @@ public class RemoteSystemsPreferencePage */ public static boolean getQualifyConnectionNamesPreference() { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); return store.getBoolean(ISystemPreferencesConstants.QUALIFY_CONNECTION_NAMES); } /** @@ -280,7 +282,7 @@ public class RemoteSystemsPreferencePage */ public static void setQualifyConnectionNamesPreference(boolean set) { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); store.setValue(ISystemPreferencesConstants.QUALIFY_CONNECTION_NAMES,set); savePreferenceStore(); } @@ -290,7 +292,7 @@ public class RemoteSystemsPreferencePage */ public static boolean getRememberStatePreference() { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); return store.getBoolean(ISystemPreferencesConstants.REMEMBER_STATE); } /** @@ -298,7 +300,7 @@ public class RemoteSystemsPreferencePage */ public static void setRememberStatePreference(boolean set) { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); store.setValue(ISystemPreferencesConstants.REMEMBER_STATE,set); savePreferenceStore(); } @@ -308,7 +310,7 @@ public class RemoteSystemsPreferencePage */ public static boolean getRestoreStateFromCachePreference() { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); return store.getBoolean(ISystemPreferencesConstants.RESTORE_STATE_FROM_CACHE); } @@ -317,7 +319,7 @@ public class RemoteSystemsPreferencePage */ public static void setRestoreStateFromCachePreference(boolean set) { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); store.setValue(ISystemPreferencesConstants.RESTORE_STATE_FROM_CACHE, set); savePreferenceStore(); } @@ -327,7 +329,7 @@ public class RemoteSystemsPreferencePage */ public static boolean getCascadeUserActionsPreference() { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); return store.getBoolean(ISystemPreferencesConstants.CASCADE_UDAS_BYPROFILE); } /** @@ -335,7 +337,7 @@ public class RemoteSystemsPreferencePage */ public static void setCascadeUserActionsPreference(boolean set) { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); store.setValue(ISystemPreferencesConstants.CASCADE_UDAS_BYPROFILE,set); savePreferenceStore(); } @@ -348,10 +350,11 @@ public class RemoteSystemsPreferencePage { if (systemType == null) return null; - SystemType[] systemTypes = SystemPlugin.getDefault().getAllSystemTypes(false); - SystemType type = SystemType.getSystemType(systemTypes, systemType); - if (type != null) - return type.getDefaultUserID(); + + IRSESystemType sysType = RSECorePlugin.getDefault().getRegistry().getSystemType(systemType); + RSESystemTypeAdapter sysTypeAdapter = (RSESystemTypeAdapter)(sysType.getAdapter(IRSESystemType.class)); + if (sysTypeAdapter != null) + return sysTypeAdapter.getDefaultUserId(sysType); else return null; } @@ -361,29 +364,36 @@ public class RemoteSystemsPreferencePage */ public static void setUserIdPreference(String systemType, String userId) { - SystemType[] systemTypes = SystemPlugin.getDefault().getAllSystemTypes(false); - SystemType type = SystemType.getSystemType(systemTypes, systemType); - if (type != null) - type.setDefaultUserID(userId); + IRSESystemType sysType = RSECorePlugin.getDefault().getRegistry().getSystemType(systemType); + RSESystemTypeAdapter sysTypeAdapter = (RSESystemTypeAdapter)(sysType.getAdapter(IRSESystemType.class)); + if (sysTypeAdapter != null) + sysTypeAdapter.setDefaultUserId(sysType, userId); else return; // following needs to stay in synch with modify() method in SystemTypeFieldEditor... - String value = SystemPlugin.getDefault().getPreferenceStore().getString(ISystemPreferencesConstants.SYSTEMTYPE_VALUES); + String value = RSEUIPlugin.getDefault().getPreferenceStore().getString(ISystemPreferencesConstants.SYSTEMTYPE_VALUES); Hashtable keyValues = null; if ((value == null) || (value.length()==0)) // not initialized yet? { keyValues = new Hashtable(); - // nothing to do, as we have read from systemtype extension points already + // nothing to do, as we have read from systemTypes extension points already } else { keyValues = parseString(value); } - keyValues.put(type.getName(),SystemType.getPreferenceStoreString(type)); + + String defaultUserId = sysTypeAdapter.getDefaultUserId(sysType); + + if (defaultUserId == null) { + defaultUserId = "null"; + } + + keyValues.put(sysType.getName(), "" + sysTypeAdapter.isEnabled(sysType) + SystemTypeFieldEditor.EACHVALUE_DELIMITER + defaultUserId); String s = SystemTypeFieldEditor.createString(keyValues); if (s != null) - SystemPlugin.getDefault().getPreferenceStore().setValue(ISystemPreferencesConstants.SYSTEMTYPE_VALUES, s); + RSEUIPlugin.getDefault().getPreferenceStore().setValue(ISystemPreferencesConstants.SYSTEMTYPE_VALUES, s); savePreferenceStore(); } @@ -395,7 +405,7 @@ public class RemoteSystemsPreferencePage */ public static Hashtable getUserIdsPerKey() { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); Hashtable keyValues = null; String value = store.getString(ISystemPreferencesConstants.USERIDPERKEY); if (value != null) @@ -411,7 +421,7 @@ public class RemoteSystemsPreferencePage */ public static void setUserIdsPerKey(Hashtable uidsPerKey) { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); store.setValue(ISystemPreferencesConstants.USERIDPERKEY, makeString(uidsPerKey)); savePreferenceStore(); } @@ -423,7 +433,7 @@ public class RemoteSystemsPreferencePage */ public static String getSystemTypePreference() { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); return store.getString(ISystemPreferencesConstants.SYSTEMTYPE); } @@ -446,7 +456,7 @@ public class RemoteSystemsPreferencePage */ public static String[] getWidgetHistory(String key) { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); return parseStrings(store.getString(key)); } /** @@ -454,7 +464,7 @@ public class RemoteSystemsPreferencePage */ public static void setWidgetHistory(String key, String[] newHistory) { - IPreferenceStore store= SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore(); store.setValue(key, makeString(newHistory)); savePreferenceStore(); } @@ -557,7 +567,7 @@ public class RemoteSystemsPreferencePage */ private static void savePreferenceStore() { - SystemPlugin.getDefault().savePluginPreferences(); + RSEUIPlugin.getDefault().savePluginPreferences(); } public void init(IWorkbench workbench) @@ -566,7 +576,7 @@ public class RemoteSystemsPreferencePage /** * Initialize our preference store with our defaults. - * This is called in SystemPlugin.initializeDefaultPreferences + * This is called in RSEUIPlugin.initializeDefaultPreferences */ public static void initDefaults(IPreferenceStore store, boolean showNewConnectionPromptDefault) { @@ -575,7 +585,7 @@ public class RemoteSystemsPreferencePage store.setDefault(ISystemPreferencesConstants.SHOWFILTERPOOLS, ISystemPreferencesConstants.DEFAULT_SHOWFILTERPOOLS); String defaultProfileNames = ISystemPreferencesConstants.DEFAULT_ACTIVEUSERPROFILES; - String userProfileName = SystemPlugin.getLocalMachineName(); + String userProfileName = RSEUIPlugin.getLocalMachineName(); defaultProfileNames += ";" + userProfileName; @@ -615,14 +625,14 @@ public class RemoteSystemsPreferencePage { boolean ok = super.performOk(); savePreferenceStore(); // better save to disk, just in case. - if (!SystemPlugin.getDefault().isSystemRegistryActive()) + if (!RSEUIPlugin.getDefault().isSystemRegistryActive()) return ok; if (showFilterPoolsEditor != null) { boolean newValue = showFilterPoolsEditor.getBooleanValue(); if (newValue != lastShowFilterPoolsValue) { - SystemPlugin.getDefault().getSystemRegistry().setShowFilterPools(newValue); + RSEUIPlugin.getDefault().getSystemRegistry().setShowFilterPools(newValue); firePreferenceChangeEvent(ISystemPreferenceChangeEvents.EVENT_SHOWFILTERPOOLS,lastShowFilterPoolsValue,newValue); } lastShowFilterPoolsValue = newValue; @@ -632,7 +642,7 @@ public class RemoteSystemsPreferencePage boolean newValue = showNewConnectionPromptEditor.getBooleanValue(); if (newValue != lastShowNewConnectionPromptValue) { - SystemPlugin.getDefault().getSystemRegistry().setShowNewHostPrompt(newValue); + RSEUIPlugin.getDefault().getSystemRegistry().setShowNewHostPrompt(newValue); } lastShowNewConnectionPromptValue = newValue; } @@ -641,7 +651,7 @@ public class RemoteSystemsPreferencePage boolean newValue = qualifyConnectionNamesEditor.getBooleanValue(); if (newValue != lastQualifyConnectionNamesValue) { - SystemPlugin.getDefault().getSystemRegistry().setQualifiedHostNames(newValue); + RSEUIPlugin.getDefault().getSystemRegistry().setQualifiedHostNames(newValue); firePreferenceChangeEvent(ISystemPreferenceChangeEvents.EVENT_QUALIFYCONNECTIONNAMES,lastQualifyConnectionNamesValue,newValue); } lastQualifyConnectionNamesValue = newValue; @@ -673,7 +683,7 @@ public class RemoteSystemsPreferencePage */ private void firePreferenceChangeEvent(int type, boolean oldValue, boolean newValue) { - SystemPlugin.getDefault().getSystemRegistry().fireEvent( + RSEUIPlugin.getDefault().getSystemRegistry().fireEvent( new SystemPreferenceChangeEvent(type, oldValue ? Boolean.TRUE : Boolean.FALSE, newValue ? Boolean.TRUE : Boolean.FALSE)); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServerConnectionSecurityPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServerConnectionSecurityPropertyPage.java index 0438da3a55b..52d02f4ee83 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServerConnectionSecurityPropertyPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServerConnectionSecurityPropertyPage.java @@ -16,12 +16,14 @@ package org.eclipse.rse.ui.propertypages; -import org.eclipse.rse.core.SystemPlugin; +import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.rse.core.comm.SystemKeystoreProviderManager; 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.SubSystem; +import org.eclipse.rse.ui.ISystemPreferencesConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.widgets.ServerConnectionSecurityForm; import org.eclipse.swt.widgets.Composite; @@ -50,7 +52,7 @@ public class ServerConnectionSecurityPropertyPage extends SystemBasePropertyPage _form.createContents(parent); initialize(); - SystemWidgetHelpers.setCompositeHelp(parent, SystemPlugin.HELPPREFIX + "ssls0001"); + SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "ssls0001"); return parent; } @@ -65,23 +67,14 @@ public class ServerConnectionSecurityPropertyPage extends SystemBasePropertyPage private void initialize() { - Object subsystem = getElement(); - if (subsystem instanceof ISubSystem) - { - ISubSystem ss = (ISubSystem) subsystem; - if (ss instanceof SubSystem) - { - _connectorService = ss.getConnectorService(); - } - + IPreferenceStore prefStore = RSEUIPlugin.getDefault().getPreferenceStore(); - // is ssl to be used for server communications - boolean useSSL = _connectorService.isUsingSSL(); + boolean alertSSL = prefStore.getBoolean(ISystemPreferencesConstants.ALERT_SSL); + boolean alertNonSSL = prefStore.getBoolean(ISystemPreferencesConstants.ALERT_NONSSL); - // enable/disable as appropriate - _form.setUseSSL(useSSL); - } - + // enable/disable as appropriate + _form.setAlertSSL(alertSSL); + _form.setAlertNonSSL(alertNonSSL); // if there is no keystore provider then this needs to be disabled boolean hasProvider = SystemKeystoreProviderManager.getInstance().hasProvider(); @@ -115,21 +108,11 @@ public class ServerConnectionSecurityPropertyPage extends SystemBasePropertyPage public boolean applyValues(IConnectorService connectorService) { - - boolean useSSL = _form.getUseSSL(); - if (useSSL != connectorService.isUsingSSL()) - { - connectorService.setIsUsingSSL(useSSL); - - try - { - connectorService.commit(); - } - catch (Exception e) - { - } - } - + boolean alertSSL = _form.getAlertSSL(); + boolean alertNonSSL = _form.getAlertNonSSL(); + IPreferenceStore prefStore = RSEUIPlugin.getDefault().getPreferenceStore(); + prefStore.setValue(ISystemPreferencesConstants.ALERT_SSL, alertSSL); + prefStore.setValue(ISystemPreferencesConstants.ALERT_NONSSL, alertNonSSL); return true; } 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 e81f5d81d8d..ed20ffb2a0e 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,14 +29,14 @@ 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.SystemPlugin; 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; -import org.eclipse.rse.ui.dialogs.SystemPasswordPersistancePrompt; +import org.eclipse.rse.ui.dialogs.SystemPasswordPersistencePrompt; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.GridData; @@ -191,7 +191,7 @@ public final class SignonPreferencePage extends PreferencePage implements IWorkb pwdTable.setLinesVisible(true); pwdTable.setHeaderVisible(true); pwdTable.addListener(SWT.Selection, this); - SystemWidgetHelpers.setHelp(pwdTable, SystemPlugin.HELPPREFIX + "pwdi0000"); + SystemWidgetHelpers.setHelp(pwdTable, RSEUIPlugin.HELPPREFIX + "pwdi0000"); TableLayout tableLayout = new TableLayout(); tableLayout.addColumnData(new ColumnWeightData(100, true)); @@ -235,11 +235,11 @@ public final class SignonPreferencePage extends PreferencePage implements IWorkb changeButton.setEnabled(false); removeButton.setEnabled(false); - SystemWidgetHelpers.setHelp(addButton, SystemPlugin.HELPPREFIX + "pwdi0000"); - SystemWidgetHelpers.setHelp(changeButton, SystemPlugin.HELPPREFIX + "pwdi0000"); - SystemWidgetHelpers.setHelp(removeButton, SystemPlugin.HELPPREFIX + "pwdi0000"); + SystemWidgetHelpers.setHelp(addButton, RSEUIPlugin.HELPPREFIX + "pwdi0000"); + SystemWidgetHelpers.setHelp(changeButton, RSEUIPlugin.HELPPREFIX + "pwdi0000"); + SystemWidgetHelpers.setHelp(removeButton, RSEUIPlugin.HELPPREFIX + "pwdi0000"); - SystemWidgetHelpers.setCompositeHelp(parent, SystemPlugin.HELPPREFIX + "pwdi0000"); + SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "pwdi0000"); SystemWidgetHelpers.setMnemonics(parent); return parent; @@ -266,7 +266,7 @@ public final class SignonPreferencePage extends PreferencePage implements IWorkb public void handleEvent(Event event) { if (event.type == SWT.Selection) { if (event.widget == addButton) { - SystemPasswordPersistancePrompt dialog = new SystemPasswordPersistancePrompt(getShell(), SystemResources.RESID_PREF_SIGNON_ADD_DIALOG_TITLE, passwords, false); + SystemPasswordPersistencePrompt dialog = new SystemPasswordPersistencePrompt(getShell(), SystemResources.RESID_PREF_SIGNON_ADD_DIALOG_TITLE, passwords, false); if (dialog.open() == Window.OK) { SystemSignonInformation info = dialog.getSignonInformation(); @@ -278,7 +278,7 @@ public final class SignonPreferencePage extends PreferencePage implements IWorkb } } else if (event.widget == changeButton) { - SystemPasswordPersistancePrompt dialog = new SystemPasswordPersistancePrompt(getShell(), SystemResources.RESID_PREF_SIGNON_CHANGE_DIALOG_TITLE, passwords, true); + SystemPasswordPersistencePrompt dialog = new SystemPasswordPersistencePrompt(getShell(), SystemResources.RESID_PREF_SIGNON_CHANGE_DIALOG_TITLE, passwords, true); int index = pwdTable.getSelectionIndex(); SystemSignonInformation info = (SystemSignonInformation) passwords.get(index); dialog.setInputData(info.getSystemType(), info.getHostname(), info.getUserid()); @@ -339,7 +339,7 @@ public final class SignonPreferencePage extends PreferencePage implements IWorkb { PasswordModification mod; PasswordPersistenceManager manager = PasswordPersistenceManager.getInstance(); - IHost[] connections = SystemPlugin.getTheSystemRegistry().getHosts(); + IHost[] connections = RSEUIPlugin.getTheSystemRegistry().getHosts(); ISubSystem[] subsystems; IConnectorService system; 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 1efc2805ff3..d89baa89266 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,7 +15,6 @@ ********************************************************************************/ package org.eclipse.rse.ui.propertypages; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.core.subsystems.SubSystemConfiguration; import org.eclipse.rse.core.subsystems.SubSystemHelpers; @@ -27,6 +26,7 @@ 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.ISystemPageCompleteListener; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemPropertyResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.filters.ISystemChangeFilterPaneEditPaneSupplier; @@ -64,10 +64,10 @@ public class SystemChangeFilterPropertyPage extends SystemBasePropertyPage public SystemChangeFilterPropertyPage() { super(); - SystemPlugin sp = SystemPlugin.getDefault(); + RSEUIPlugin sp = RSEUIPlugin.getDefault(); changeFilterPane = new SystemChangeFilterPane(null, this, this); changeFilterPane.addPageCompleteListener(this); - setHelp(SystemPlugin.HELPPREFIX+"dufr0000"); + setHelp(RSEUIPlugin.HELPPREFIX+"dufr0000"); } // INPUT/CONFIGURATION diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemCommunicationsPreferencePage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemCommunicationsPreferencePage.java index acdb985e9d3..88d59de7d11 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemCommunicationsPreferencePage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemCommunicationsPreferencePage.java @@ -19,11 +19,11 @@ package org.eclipse.rse.ui.propertypages; import org.eclipse.jface.preference.FieldEditorPreferencePage; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.preference.IntegerFieldEditor; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.comm.SystemCommunicationsDaemon; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.ISystemPreferencesConstants; import org.eclipse.rse.ui.Mnemonics; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.swt.widgets.Composite; @@ -46,7 +46,7 @@ public class SystemCommunicationsPreferencePage extends FieldEditorPreferencePag public SystemCommunicationsPreferencePage() { super(GRID); - setPreferenceStore(SystemPlugin.getDefault().getPreferenceStore()); + setPreferenceStore(RSEUIPlugin.getDefault().getPreferenceStore()); setDescription(SystemResources.RESID_PREF_COMMUNICATIONS_TITLE); } @@ -83,15 +83,15 @@ public class SystemCommunicationsPreferencePage extends FieldEditorPreferencePag parent ); portEditor.setValidRange(1, 65536); - portEditor.setErrorMessage(SystemPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_NOTVALID).getLevelOneText()); + portEditor.setErrorMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_NOTVALID).getLevelOneText()); addField(portEditor); portEditor.getTextControl(parent).setToolTipText(SystemResources.RESID_PREF_DAEMON_PORT_TOOLTIP); - SystemWidgetHelpers.setHelp(portEditor.getTextControl(parent), SystemPlugin.HELPPREFIX + "cmmp0000"); + SystemWidgetHelpers.setHelp(portEditor.getTextControl(parent), RSEUIPlugin.HELPPREFIX + "cmmp0000"); (new Mnemonics()).setOnPreferencePage(true).setMnemonics(parent); - SystemWidgetHelpers.setCompositeHelp(parent, SystemPlugin.HELPPREFIX + "cmmp0000"); + SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "cmmp0000"); } 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 22d5f9a174c..06917d8916f 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 @@ -15,14 +15,14 @@ ********************************************************************************/ package org.eclipse.rse.ui.propertypages; -import org.eclipse.rse.core.ISystemTypes; +import org.eclipse.rse.core.IRSESystemType; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; 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.SystemConnectionForm; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.messages.ISystemMessageLine; import org.eclipse.rse.ui.validators.ISystemValidator; @@ -47,9 +47,9 @@ public class SystemConnectionPropertyPage extends SystemBasePropertyPage public SystemConnectionPropertyPage() { super(); - SystemPlugin sp = SystemPlugin.getDefault(); + RSEUIPlugin sp = RSEUIPlugin.getDefault(); - parentHelpId = SystemPlugin.HELPPREFIX + "pcon0000"; + parentHelpId = RSEUIPlugin.HELPPREFIX + "pcon0000"; form = new SystemConnectionForm(this, this); } /** @@ -89,7 +89,7 @@ public class SystemConnectionPropertyPage extends SystemBasePropertyPage if (okToClose) { IHost conn = (IHost)getElement(); - ISystemRegistry sr = SystemPlugin.getDefault().getSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); sr.updateHost( getShell(),conn,conn.getSystemType(),form.getConnectionName(), form.getHostName(), form.getConnectionDescription(), form.getDefaultUserId(), form.getUserIdLocation() ); @@ -130,7 +130,7 @@ public class SystemConnectionPropertyPage extends SystemBasePropertyPage } // check that everything was disconnedted okay and this is not the local connection - if(sr.isAnySubSystemConnected(conn) && !ISystemTypes.SYSTEMTYPE_LOCAL.equals(conn.getSystemType())) + if(sr.isAnySubSystemConnected(conn) && !IRSESystemType.SYSTEMTYPE_LOCAL.equals(conn.getSystemType())) { // backout changes, likely because user cancelled the disconnect sr.setHostOffline(conn, false); 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 05e8916c103..330768f91bd 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,10 +20,10 @@ import java.util.Vector; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.rse.core.SystemAdapterHelpers; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.model.IHost; import org.eclipse.rse.ui.ISystemConnectionFormCaller; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemPropertyResources; import org.eclipse.rse.ui.SystemTabFolderLayout; import org.eclipse.rse.ui.SystemWidgetHelpers; @@ -71,8 +71,8 @@ public class SystemConnectionSubSystemsPropertyPage extends SystemBasePropertyPa public SystemConnectionSubSystemsPropertyPage() { super(); - SystemPlugin sp = SystemPlugin.getDefault(); - parentHelpId = SystemPlugin.HELPPREFIX + "pcon0000"; + RSEUIPlugin sp = RSEUIPlugin.getDefault(); + parentHelpId = RSEUIPlugin.HELPPREFIX + "pcon0000"; } /** @@ -227,7 +227,7 @@ public class SystemConnectionSubSystemsPropertyPage extends SystemBasePropertyPa protected ISubSystem[] getSubSystems() { ISubSystem[] subsystems = - SystemPlugin.getTheSystemRegistry().getSubSystems(getConnection()); + RSEUIPlugin.getTheSystemRegistry().getSubSystems(getConnection()); return subsystems; } 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 cba40bae38c..6e0031f0e30 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,10 +15,10 @@ ********************************************************************************/ package org.eclipse.rse.ui.propertypages; -import org.eclipse.rse.core.SystemPlugin; 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; import org.eclipse.rse.ui.SystemWidgetHelpers; @@ -45,7 +45,7 @@ public class SystemFilterPoolPropertyPage extends SystemBasePropertyPage public SystemFilterPoolPropertyPage() { super(); - SystemPlugin sp = SystemPlugin.getDefault(); + RSEUIPlugin sp = RSEUIPlugin.getDefault(); } /** * Create the page's GUI contents. 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 61ef94958c5..f56d5570a4d 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,11 +15,11 @@ ********************************************************************************/ package org.eclipse.rse.ui.propertypages; -import org.eclipse.rse.core.SystemPlugin; 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; import org.eclipse.swt.widgets.Composite; @@ -45,7 +45,7 @@ public class SystemFilterPoolReferencePropertyPage extends SystemBasePropertyPag public SystemFilterPoolReferencePropertyPage() { super(); - SystemPlugin sp = SystemPlugin.getDefault(); + RSEUIPlugin sp = RSEUIPlugin.getDefault(); } /** * Create the page's GUI contents. 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 ab726376466..10402e41af7 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,11 +15,11 @@ ********************************************************************************/ package org.eclipse.rse.ui.propertypages; -import org.eclipse.rse.core.SystemPlugin; 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; import org.eclipse.swt.widgets.Composite; @@ -45,7 +45,7 @@ public class SystemFilterPropertyPage extends SystemBasePropertyPage public SystemFilterPropertyPage() { super(); - SystemPlugin sp = SystemPlugin.getDefault(); + RSEUIPlugin sp = RSEUIPlugin.getDefault(); } /** * Create the page's GUI contents. 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 dac3af36cb8..e2c7ad72838 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,7 +19,6 @@ import java.util.ResourceBundle; import java.util.Vector; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.core.subsystems.util.ISubsystemConfigurationAdapter; import org.eclipse.rse.filters.ISystemFilter; @@ -30,6 +29,7 @@ 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; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.filters.ISystemFilterStringEditPaneListener; @@ -71,7 +71,7 @@ public class SystemFilterStringPropertyPage extends SystemBasePropertyPage imple public SystemFilterStringPropertyPage() { super(); - SystemPlugin sp = SystemPlugin.getDefault(); + RSEUIPlugin sp = RSEUIPlugin.getDefault(); } // configuration methods, called by customizeFilterStringPropertyPage in SubSystemFactoryImpl... @@ -304,7 +304,7 @@ public class SystemFilterStringPropertyPage extends SystemBasePropertyPage imple catch (Exception exc) { //displayErrorMessage("Error updating filter: " + exc.getMessage()); - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_UPDATEFILTER_FAILED); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UPDATEFILTER_FAILED); String excText = exc.getMessage(); if (excText == null) excText = exc.getClass().getName(); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemLoggingPreferencePage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemLoggingPreferencePage.java index f328db9fcf4..92070fc14e6 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemLoggingPreferencePage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemLoggingPreferencePage.java @@ -16,8 +16,8 @@ package org.eclipse.rse.ui.propertypages; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.logging.LoggingPreferencePage; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.ui.plugin.AbstractUIPlugin; @@ -30,6 +30,6 @@ public class SystemLoggingPreferencePage extends LoggingPreferencePage { * @see com.ibm.etools.systems.logging.LoggingPreferencePage#getPlugin() */ protected AbstractUIPlugin getPlugin() { - return SystemPlugin.getDefault(); + return RSEUIPlugin.getDefault(); } } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemPreferenceInitializer.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemPreferenceInitializer.java index 341ffa27406..f1494aaa06e 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemPreferenceInitializer.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemPreferenceInitializer.java @@ -17,7 +17,7 @@ package org.eclipse.rse.ui.propertypages; import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; -import org.eclipse.rse.core.SystemPlugin; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -36,6 +36,6 @@ public class SystemPreferenceInitializer extends AbstractPreferenceInitializer { * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences() */ public void initializeDefaultPreferences() { - SystemPlugin.getDefault().initializeDefaultPreferences(); + RSEUIPlugin.getDefault().initializeDefaultPreferences(); } } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemRemotePropertyPageNode.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemRemotePropertyPageNode.java index 945bd1680e2..088c05b1f01 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemRemotePropertyPageNode.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemRemotePropertyPageNode.java @@ -32,11 +32,11 @@ public class SystemRemotePropertyPageNode extends PreferenceNode private SystemPropertyPageExtension contributor; private IWorkbenchPropertyPage page; private Image icon; - private IAdaptable element; + private Object element; /** * Constructor. */ - public SystemRemotePropertyPageNode(SystemPropertyPageExtension contributor, IAdaptable element) + public SystemRemotePropertyPageNode(SystemPropertyPageExtension contributor, Object element) { super(contributor.getId()); this.contributor = contributor; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemSubSystemPropertyPageCore.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemSubSystemPropertyPageCore.java index c122e012328..ad9e052111c 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemSubSystemPropertyPageCore.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemSubSystemPropertyPageCore.java @@ -15,11 +15,11 @@ ********************************************************************************/ package org.eclipse.rse.ui.propertypages; -import org.eclipse.rse.core.SystemPlugin; 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.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.messages.ISystemMessageLine; import org.eclipse.swt.widgets.Composite; @@ -61,7 +61,7 @@ public class SystemSubSystemPropertyPageCore extends SystemBasePropertyPage form = new SystemSubSystemPropertyPageCoreForm(this, this); } Control c = form.createContents(parent, getElement(), getShell()); - SystemWidgetHelpers.setCompositeHelp(parent, SystemPlugin.HELPPREFIX + "psubs0000"); + SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "psubs0000"); return c; } 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 ebccdf54681..fb1a85d2c27 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 @@ -16,11 +16,11 @@ package org.eclipse.rse.ui.propertypages; import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemPropertyResources; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; @@ -219,7 +219,7 @@ public class SystemSubSystemPropertyPageCoreForm extends AbstractSystemSubSystem if (userIdValidator != null) errorMessage= userIdValidator.validate(textUserId.getText()); else if (getUserId().equals("")) - errorMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_USERID_EMPTY); + errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_USERID_EMPTY); } setErrorMessage(errorMessage); //setPageComplete(); @@ -239,7 +239,7 @@ public class SystemSubSystemPropertyPageCoreForm extends AbstractSystemSubSystem if (portValidator != null) errorMessage= portValidator.validate(textPort.getText()); else if (getPort().equals("")) - errorMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_USERID_EMPTY); + errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_USERID_EMPTY); } setErrorMessage(errorMessage); //setPageComplete(); 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 16a093ab9c8..708f1b20c1a 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,8 +15,8 @@ ********************************************************************************/ package org.eclipse.rse.ui.propertypages; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.ISystemProfile; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemPropertyResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.view.SystemViewResources; @@ -94,7 +94,7 @@ public class SystemTeamViewProfilePropertyPage extends SystemBasePropertyPage ISystemProfile profile = getProfile(); // populate GUI... labelName.setText(profile.getName()); - boolean active = SystemPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName()); + boolean active = RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName()); if (active) labelStatus.setText(SystemViewResources.RESID_PROPERTY_PROFILESTATUS_ACTIVE_LABEL); else diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTypeFieldEditor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTypeFieldEditor.java index 85bb2c505ac..a3818fff388 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTypeFieldEditor.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTypeFieldEditor.java @@ -35,9 +35,11 @@ import org.eclipse.jface.viewers.TableLayout; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.TextCellEditor; import org.eclipse.jface.viewers.Viewer; -import org.eclipse.rse.core.SystemPlugin; -import org.eclipse.rse.core.SystemType; +import org.eclipse.rse.core.IRSESystemType; +import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.ui.ISystemPreferencesConstants; +import org.eclipse.rse.ui.RSESystemTypeAdapter; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.swt.SWT; @@ -64,7 +66,7 @@ public class SystemTypeFieldEditor extends FieldEditor private static final char KEYVALUEPAIR_DELIMITER=';'; public static final char EACHVALUE_DELIMITER='+'; private Hashtable keyValues; - private SystemType[] systemTypes; + private IRSESystemType[] systemTypes; private boolean enabledStateChanged = false; @@ -179,7 +181,6 @@ public class SystemTypeFieldEditor extends FieldEditor { if (systemTypes != null) { - SystemPlugin.getDefault().setSystemTypes(systemTypes); String s = createString(keyValues); if (s != null) @@ -230,7 +231,7 @@ public class SystemTypeFieldEditor extends FieldEditor tableData.grabExcessVerticalSpace = true; table.setLayoutData(tableData); - SystemWidgetHelpers.setHelp(table, SystemPlugin.HELPPREFIX+"systype_preferences"); + SystemWidgetHelpers.setHelp(table, RSEUIPlugin.HELPPREFIX+"systype_preferences"); return table; } @@ -305,9 +306,9 @@ public class SystemTypeFieldEditor extends FieldEditor return sb.toString(); } - private SystemType[] getSystemTypes(boolean defaults) + private IRSESystemType[] getSystemTypes(boolean defaults) { - return SystemPlugin.getDefault().getAllSystemTypes(defaults); + return RSECorePlugin.getDefault().getRegistry().getSystemTypes(); } // ------------------------ @@ -335,15 +336,16 @@ public class SystemTypeFieldEditor extends FieldEditor */ public Object getValue(Object element, String property) { - SystemType row = (SystemType)element; + IRSESystemType row = (IRSESystemType)element; + RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(row.getAdapter(IRSESystemType.class)); Object value = ""; if (property.equals(P_NAME)) value = row.getName(); else if (property.equals(P_ENABLED)) - value = (row.isEnabled() ? new Integer(0) : new Integer(1)); + value = (adapter.isEnabled(row) ? new Integer(0) : new Integer(1)); else if (property.equals(P_USERID)) - value = (row.getDefaultUserID() == null) ? "" : row.getDefaultUserID(); + value = (adapter.getDefaultUserId(row) == null) ? "" : adapter.getDefaultUserId(row); else value = (row.getDescription() == null) ? "" : row.getDescription(); @@ -360,22 +362,23 @@ public class SystemTypeFieldEditor extends FieldEditor */ public void modify(Object element, String property, Object value) { - SystemType row = (SystemType)(((TableItem)element).getData()); + IRSESystemType row = (IRSESystemType)(((TableItem)element).getData()); + RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(row.getAdapter(IRSESystemType.class)); if (property.equals(P_ENABLED)) { Integer val = (Integer)value; - row.setEnabled(enabledStates[val.intValue()]); + adapter.setIsEnabled(row, enabledStates[val.intValue()]); enabledStateChanged = true; } else if (property.equals(P_USERID)) { - row.setDefaultUserID((String)value); + adapter.setDefaultUserId(row, (String)value); } else return; - keyValues.put(row.getName(), SystemType.getPreferenceStoreString(row)); + keyValues.put(row.getName(), ""); tableViewer.update(row, null); } @@ -396,14 +399,15 @@ public class SystemTypeFieldEditor extends FieldEditor */ public String getColumnText(Object element, int columnIndex) { - SystemType currType = (SystemType)element; + IRSESystemType currType = (IRSESystemType)element; + RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(currType.getAdapter(IRSESystemType.class)); if (columnIndex == COLUMN_NAME) return currType.getName(); else if (columnIndex == COLUMN_ENABLED) - return Boolean.toString(currType.isEnabled()); + return Boolean.toString(adapter.isEnabled(currType)); else if (columnIndex == COLUMN_USERID) - return (currType.getDefaultUserID()==null ? "" : currType.getDefaultUserID()); + return (adapter.getDefaultUserId(currType)==null ? "" : adapter.getDefaultUserId(currType)); else return (currType.getDescription()==null ? "" : currType.getDescription()); } @@ -462,14 +466,14 @@ public class SystemTypeFieldEditor extends FieldEditor table.setToolTipText(tip); } - public static Hashtable initSystemTypePreferences(IPreferenceStore store, SystemType[] systemTypes) + public static Hashtable initSystemTypePreferences(IPreferenceStore store, IRSESystemType[] systemTypes) { String value = store.getString(ISystemPreferencesConstants.SYSTEMTYPE_VALUES); Hashtable keyValues = null; if ((value == null) || (value.length()==0)) // not initialized yet? { return null; - // nothing to do, as we have read from systemtype extension points already + // nothing to do, as we have read from systemTypes extension points already } else { @@ -500,13 +504,15 @@ public class SystemTypeFieldEditor extends FieldEditor } } // find this system type in the array... - SystemType matchingType = SystemType.getSystemType(systemTypes, key); + IRSESystemType matchingType = RSECorePlugin.getDefault().getRegistry().getSystemType(key); + RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(matchingType.getAdapter(IRSESystemType.class)); + // update this system type's attributes as per preferences... if (matchingType!=null) { - matchingType.setEnabled(attr1.equals("true")); + adapter.setIsEnabled(matchingType, attr1.equals("true")); if (!attr2.equals("null")) - matchingType.setDefaultUserID(attr2); + adapter.setDefaultUserId(matchingType, attr2); } } } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorArchiveName.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorArchiveName.java index c57af419946..52445f4c227 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorArchiveName.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorArchiveName.java @@ -19,9 +19,9 @@ import java.util.Vector; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IStatus; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager; import org.eclipse.rse.services.clientserver.messages.SystemMessage; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -57,7 +57,7 @@ public class ValidatorArchiveName extends ValidatorFileName { */ public SystemMessage isSyntaxOk(String newText) { - msg_NotRegisteredArchive = SystemPlugin.getPluginMessage(MSG_VALIDATE_ARCHIVE_NAME); + msg_NotRegisteredArchive = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_ARCHIVE_NAME); msg_NotRegisteredArchive.makeSubstitution(newText); IStatus rc = workspace.validateName(newText, IResource.FILE); if (rc.getCode() != IStatus.OK) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorCompileCommandLabel.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorCompileCommandLabel.java index 4814d632315..1279ee2883c 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorCompileCommandLabel.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorCompileCommandLabel.java @@ -19,9 +19,9 @@ import java.util.Vector; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -65,13 +65,13 @@ public class ValidatorCompileCommandLabel extends ValidatorUniqueString private void init() { - super.setErrorMessages(SystemPlugin.getPluginMessage(MSG_VALIDATE_COMPILELABEL_EMPTY), - SystemPlugin.getPluginMessage(MSG_VALIDATE_COMPILELABEL_NOTUNIQUE)); + super.setErrorMessages(RSEUIPlugin.getPluginMessage(MSG_VALIDATE_COMPILELABEL_EMPTY), + RSEUIPlugin.getPluginMessage(MSG_VALIDATE_COMPILELABEL_NOTUNIQUE)); fUnique = true; - msg_Invalid = SystemPlugin.getPluginMessage(MSG_VALIDATE_COMPILELABEL_NOTVALID); + msg_Invalid = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_COMPILELABEL_NOTVALID); } /** - * Supply your own error message text. By default, messages from SystemPlugin resource bundle are used. + * Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used. * @param error message when entry field is empty * @param error message when value entered is not unique * @param error message when syntax is not valid 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 e2a8b71aaf1..58e0985bf6c 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,10 +17,10 @@ package org.eclipse.rse.ui.validators; import java.util.Vector; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.IHost; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.swt.widgets.Shell; @@ -43,9 +43,9 @@ public class ValidatorConnectionName extends ValidatorFolderName implements ISys public ValidatorConnectionName(Vector existingNameList) { super(existingNameList); - super.setErrorMessages(SystemPlugin.getPluginMessage(MSG_VALIDATE_CONNECTIONNAME_EMPTY), - SystemPlugin.getPluginMessage(MSG_VALIDATE_CONNECTIONNAME_NOTUNIQUE), - SystemPlugin.getPluginMessage(MSG_VALIDATE_CONNECTIONNAME_NOTVALID)); + super.setErrorMessages(RSEUIPlugin.getPluginMessage(MSG_VALIDATE_CONNECTIONNAME_EMPTY), + RSEUIPlugin.getPluginMessage(MSG_VALIDATE_CONNECTIONNAME_NOTUNIQUE), + RSEUIPlugin.getPluginMessage(MSG_VALIDATE_CONNECTIONNAME_NOTVALID)); } /** @@ -59,16 +59,16 @@ public class ValidatorConnectionName extends ValidatorFolderName implements ISys public static boolean validateNameNotInUse(String proposedName, Shell shell) { SystemMessage msg = null; - Vector profileNames = SystemPlugin.getTheSystemProfileManager().getSystemProfileNamesVector(); + Vector profileNames = RSEUIPlugin.getTheSystemProfileManager().getSystemProfileNamesVector(); String profileName = null; for (int idx=0; (msg==null)&& (idx|"); nbrSpecialChars = specialChars.length(); } /** - * Supply your own error message text. By default, messages from SystemPlugin resource bundle are used. + * Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used. * @param error message when entry field is empty * @param error message when value entered is not unique * @param error message when syntax is not valid diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorPortInput.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorPortInput.java index 309ec9ebdde..646aa45c370 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorPortInput.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorPortInput.java @@ -15,8 +15,8 @@ ********************************************************************************/ package org.eclipse.rse.ui.validators; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -31,8 +31,8 @@ public class ValidatorPortInput extends ValidatorIntegerInput public ValidatorPortInput() { - super(SystemPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_EMPTY), - SystemPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_NOTVALID)); + super(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_EMPTY), + RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_NOTVALID)); } /** @@ -47,8 +47,8 @@ public class ValidatorPortInput extends ValidatorIntegerInput if (number < 0 || number > MAXIMUM_PORT_NUMBER) { //if (number <= 0) // we don't let user enter 0 explicitly, only via button selection. - //currentMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_EMPTY); - currentMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_NOTVALID); + //currentMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_EMPTY); + currentMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_NOTVALID); msg = currentMessage.getLevelOneText(); } } @@ -68,8 +68,8 @@ public class ValidatorPortInput extends ValidatorIntegerInput if (number < 0 || number > MAXIMUM_PORT_NUMBER) { //if (number <= 0) // we don't let user enter 0 explicitly, only via button selection. - //currentMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_EMPTY); - currentMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_NOTVALID); + //currentMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_EMPTY); + currentMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_NOTVALID); msg = currentMessage.getLevelOneText(); } } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorProfileName.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorProfileName.java index d12be4083c7..c8f8a0f0c3d 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorProfileName.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorProfileName.java @@ -17,9 +17,9 @@ package org.eclipse.rse.ui.validators; import java.util.Vector; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -41,9 +41,9 @@ public class ValidatorProfileName public ValidatorProfileName(Vector existingNameList) { super(existingNameList); - super.setErrorMessages(SystemPlugin.getPluginMessage(MSG_VALIDATE_PROFILENAME_EMPTY), - SystemPlugin.getPluginMessage(MSG_VALIDATE_PROFILENAME_NOTUNIQUE), - SystemPlugin.getPluginMessage(MSG_VALIDATE_PROFILENAME_NOTVALID)); + super.setErrorMessages(RSEUIPlugin.getPluginMessage(MSG_VALIDATE_PROFILENAME_EMPTY), + RSEUIPlugin.getPluginMessage(MSG_VALIDATE_PROFILENAME_NOTUNIQUE), + RSEUIPlugin.getPluginMessage(MSG_VALIDATE_PROFILENAME_NOTVALID)); } /** @@ -60,7 +60,7 @@ public class ValidatorProfileName private SystemMessage getReservedNameMessage() { if (reservedNameMsg == null) - reservedNameMsg = SystemPlugin.getPluginMessage(MSG_VALIDATE_PROFILENAME_RESERVED); + reservedNameMsg = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_PROFILENAME_RESERVED); return reservedNameMsg; } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorServerPortInput.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorServerPortInput.java index 018c0ea7e74..e6542d7fc27 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorServerPortInput.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorServerPortInput.java @@ -17,8 +17,8 @@ package org.eclipse.rse.ui.validators; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; @@ -36,7 +36,7 @@ public class ValidatorServerPortInput extends ValidatorPortInput // check that it's not a used port if (number == 4035) { - currentMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PORT_WARNING); + currentMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PORT_WARNING); currentMessage.makeSubstitution("4035", "RSE daemon"); msg = currentMessage.getLevelOneText(); } @@ -54,7 +54,7 @@ public class ValidatorServerPortInput extends ValidatorPortInput // check that it's not a used port if (number == 4035) { - currentMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PORT_WARNING); + currentMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PORT_WARNING); currentMessage.makeSubstitution("4035", "RSE daemon"); msg = currentMessage.getLevelOneText(); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSourceType.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSourceType.java index 429952f8e17..8d97c5fb933 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSourceType.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSourceType.java @@ -15,9 +15,9 @@ ********************************************************************************/ package org.eclipse.rse.ui.validators; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -45,13 +45,13 @@ public class ValidatorSourceType extends ValidatorUniqueString private void init() { - super.setErrorMessages(SystemPlugin.getPluginMessage(MSG_VALIDATE_SRCTYPE_EMPTY), - SystemPlugin.getPluginMessage(MSG_VALIDATE_SRCTYPE_NOTUNIQUE)); - msg_Invalid = SystemPlugin.getPluginMessage(MSG_VALIDATE_SRCTYPE_NOTVALID); + super.setErrorMessages(RSEUIPlugin.getPluginMessage(MSG_VALIDATE_SRCTYPE_EMPTY), + RSEUIPlugin.getPluginMessage(MSG_VALIDATE_SRCTYPE_NOTUNIQUE)); + msg_Invalid = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_SRCTYPE_NOTVALID); } /** - * Supply your own error message text. By default, messages from SystemPlugin resource bundle are used. + * Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used. * @param error message when entry field is empty * @param error message when value entered is not unique * @param error message when syntax is not valid diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSpecialChar.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSpecialChar.java index acccf2cff5b..53597d6ea57 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSpecialChar.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSpecialChar.java @@ -15,9 +15,9 @@ ********************************************************************************/ package org.eclipse.rse.ui.validators; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -47,7 +47,7 @@ public class ValidatorSpecialChar */ public ValidatorSpecialChar(String specialChars, boolean isEmptyAllowed) { - this(specialChars, isEmptyAllowed, SystemPlugin.getPluginMessage(MSG_VALIDATE_ENTRY_NOTVALID), SystemPlugin.getPluginMessage(MSG_VALIDATE_ENTRY_EMPTY)); + this(specialChars, isEmptyAllowed, RSEUIPlugin.getPluginMessage(MSG_VALIDATE_ENTRY_NOTVALID), RSEUIPlugin.getPluginMessage(MSG_VALIDATE_ENTRY_EMPTY)); } /** * Constructor @@ -57,7 +57,7 @@ public class ValidatorSpecialChar */ public ValidatorSpecialChar(String specialChars, boolean isEmptyAllowed, SystemMessage msg_Invalid) { - this(specialChars, isEmptyAllowed, msg_Invalid, SystemPlugin.getPluginMessage(MSG_VALIDATE_ENTRY_EMPTY)); + this(specialChars, isEmptyAllowed, msg_Invalid, RSEUIPlugin.getPluginMessage(MSG_VALIDATE_ENTRY_EMPTY)); } /** * Constructor @@ -74,7 +74,7 @@ public class ValidatorSpecialChar setErrorMessages(msg_Empty, msg_Invalid); } /** - * Supply your own error message text. By default, messages from SystemPlugin resource bundle are used. + * Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used. * @param error message when entry field is empty or null if to keep the default * @param error message when value entered is not valid, or null if to keep the default */ diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSystemName.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSystemName.java index d2eb65f7433..1f13de9ef0a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSystemName.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSystemName.java @@ -17,8 +17,8 @@ package org.eclipse.rse.ui.validators; import java.util.Vector; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.services.clientserver.messages.SystemMessage; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -46,10 +46,10 @@ public class ValidatorSystemName public ValidatorSystemName(Vector existingNameList) { super(existingNameList, true); // case sensitive uniqueness - super.setErrorMessages(SystemPlugin.getPluginMessage(MSG_VALIDATE_NAME_EMPTY), - SystemPlugin.getPluginMessage(MSG_VALIDATE_NAME_NOTUNIQUE)); + super.setErrorMessages(RSEUIPlugin.getPluginMessage(MSG_VALIDATE_NAME_EMPTY), + RSEUIPlugin.getPluginMessage(MSG_VALIDATE_NAME_NOTUNIQUE)); fUnique = true; - msg_Invalid = SystemPlugin.getPluginMessage(MSG_VALIDATE_NAME_NOTVALID); + msg_Invalid = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_NAME_NOTVALID); } /** * Use this constructor when the name must be unique. Give the @@ -58,10 +58,10 @@ public class ValidatorSystemName public ValidatorSystemName(String existingNameList[]) { super(existingNameList, true); // case sensitive uniqueness - super.setErrorMessages(SystemPlugin.getPluginMessage(MSG_VALIDATE_NAME_EMPTY), - SystemPlugin.getPluginMessage(MSG_VALIDATE_NAME_NOTUNIQUE)); + super.setErrorMessages(RSEUIPlugin.getPluginMessage(MSG_VALIDATE_NAME_EMPTY), + RSEUIPlugin.getPluginMessage(MSG_VALIDATE_NAME_NOTUNIQUE)); fUnique = true; - msg_Invalid = SystemPlugin.getPluginMessage(MSG_VALIDATE_NAME_NOTVALID); + msg_Invalid = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_NAME_NOTVALID); } /** @@ -71,13 +71,13 @@ public class ValidatorSystemName public ValidatorSystemName() { super(new String[0], true); - super.setErrorMessages(SystemPlugin.getPluginMessage(MSG_VALIDATE_NAME_EMPTY), - SystemPlugin.getPluginMessage(MSG_VALIDATE_NAME_NOTUNIQUE)); + super.setErrorMessages(RSEUIPlugin.getPluginMessage(MSG_VALIDATE_NAME_EMPTY), + RSEUIPlugin.getPluginMessage(MSG_VALIDATE_NAME_NOTUNIQUE)); fUnique = false; - msg_Invalid = SystemPlugin.getPluginMessage(MSG_VALIDATE_NAME_NOTVALID); + msg_Invalid = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_NAME_NOTVALID); } /** - * Supply your own error message text. By default, messages from SystemPlugin resource bundle are used. + * Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used. * @param error message when entry field is empty * @param error message when value entered is not unique * @param error message when syntax is not valid diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUniqueString.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUniqueString.java index e3d974f9f9b..2dfdbad5b59 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUniqueString.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUniqueString.java @@ -18,9 +18,9 @@ package org.eclipse.rse.ui.validators; import java.util.Arrays; import java.util.Vector; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -59,8 +59,8 @@ public class ValidatorUniqueString this.caseSensitive = caseSensitive; setExistingNamesList(existingList); // initialize error messages - setErrorMessages(SystemPlugin.getPluginMessage(MSG_VALIDATE_ENTRY_EMPTY), - SystemPlugin.getPluginMessage(MSG_VALIDATE_ENTRY_NOTUNIQUE)); + setErrorMessages(RSEUIPlugin.getPluginMessage(MSG_VALIDATE_ENTRY_EMPTY), + RSEUIPlugin.getPluginMessage(MSG_VALIDATE_ENTRY_NOTUNIQUE)); } /** * Constructor accepting an Array. @@ -72,8 +72,8 @@ public class ValidatorUniqueString this.caseSensitive = caseSensitive; init(existingList, caseSensitive); // initialize error messages - setErrorMessages(SystemPlugin.getPluginMessage(MSG_VALIDATE_ENTRY_EMPTY), - SystemPlugin.getPluginMessage(MSG_VALIDATE_ENTRY_NOTUNIQUE)); + setErrorMessages(RSEUIPlugin.getPluginMessage(MSG_VALIDATE_ENTRY_EMPTY), + RSEUIPlugin.getPluginMessage(MSG_VALIDATE_ENTRY_NOTUNIQUE)); } /** * Constructor accepting a Vector and another validator to use for the syntax checking. @@ -208,7 +208,7 @@ public class ValidatorUniqueString } /** - * Supply your own error message text. By default, messages from SystemPlugin resource bundle are used. + * Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used. * @param error message when entry field is empty or null if to keep the default * @param error message when value entered is not unique or null if to keep the default */ diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionCommand.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionCommand.java index 0a14bf53b47..c443562ed11 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionCommand.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionCommand.java @@ -15,9 +15,9 @@ ********************************************************************************/ package org.eclipse.rse.ui.validators; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -36,8 +36,8 @@ public class ValidatorUserActionCommand */ public ValidatorUserActionCommand() { - setErrorMessages(SystemPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDACMD_EMPTY), - SystemPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDACMD_NOTVALID)); + setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDACMD_EMPTY), + RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDACMD_NOTVALID)); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionComment.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionComment.java index ed05126303b..6b87af3a4bc 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionComment.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionComment.java @@ -15,9 +15,9 @@ ********************************************************************************/ package org.eclipse.rse.ui.validators; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -36,8 +36,8 @@ public class ValidatorUserActionComment */ public ValidatorUserActionComment() { - setErrorMessages(SystemPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDACMT_EMPTY), - SystemPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDACMT_NOTVALID)); + setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDACMT_EMPTY), + RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDACMT_NOTVALID)); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionName.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionName.java index 8fbbcb7f1f2..bcfa018835b 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionName.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionName.java @@ -19,9 +19,9 @@ import java.util.Vector; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -67,13 +67,13 @@ public class ValidatorUserActionName extends ValidatorUniqueString private void init() { - super.setErrorMessages(SystemPlugin.getPluginMessage(MSG_VALIDATE_UDANAME_EMPTY), - SystemPlugin.getPluginMessage(MSG_VALIDATE_UDANAME_NOTUNIQUE)); + super.setErrorMessages(RSEUIPlugin.getPluginMessage(MSG_VALIDATE_UDANAME_EMPTY), + RSEUIPlugin.getPluginMessage(MSG_VALIDATE_UDANAME_NOTUNIQUE)); fUnique = true; - msg_Invalid = SystemPlugin.getPluginMessage(MSG_VALIDATE_UDANAME_NOTVALID); + msg_Invalid = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_UDANAME_NOTVALID); } /** - * Supply your own error message text. By default, messages from SystemPlugin resource bundle are used. + * Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used. * @param error message when entry field is empty * @param error message when value entered is not unique * @param error message when syntax is not valid diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserId.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserId.java index ca9074362f3..44872613b5a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserId.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserId.java @@ -15,9 +15,9 @@ ********************************************************************************/ package org.eclipse.rse.ui.validators; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -37,7 +37,7 @@ public class ValidatorUserId */ public ValidatorUserId(boolean isEmptyAllowed) { - super("=;", isEmptyAllowed, SystemPlugin.getPluginMessage(MSG_VALIDATE_USERID_NOTVALID), SystemPlugin.getPluginMessage(MSG_VALIDATE_USERID_EMPTY)); + super("=;", isEmptyAllowed, RSEUIPlugin.getPluginMessage(MSG_VALIDATE_USERID_NOTVALID), RSEUIPlugin.getPluginMessage(MSG_VALIDATE_USERID_EMPTY)); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserTypeName.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserTypeName.java index 985c99e8b71..642a94504ba 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserTypeName.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserTypeName.java @@ -15,9 +15,9 @@ ********************************************************************************/ package org.eclipse.rse.ui.validators; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -41,13 +41,13 @@ public class ValidatorUserTypeName extends ValidatorUniqueString private void init() { - super.setErrorMessages(SystemPlugin.getPluginMessage(MSG_VALIDATE_UDTNAME_EMPTY), - SystemPlugin.getPluginMessage(MSG_VALIDATE_UDTNAME_NOTUNIQUE)); - msg_Invalid = SystemPlugin.getPluginMessage(MSG_VALIDATE_UDTNAME_NOTVALID); + super.setErrorMessages(RSEUIPlugin.getPluginMessage(MSG_VALIDATE_UDTNAME_EMPTY), + RSEUIPlugin.getPluginMessage(MSG_VALIDATE_UDTNAME_NOTUNIQUE)); + msg_Invalid = RSEUIPlugin.getPluginMessage(MSG_VALIDATE_UDTNAME_NOTVALID); } /** - * Supply your own error message text. By default, messages from SystemPlugin resource bundle are used. + * Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used. * @param error message when entry field is empty * @param error message when value entered is not unique * @param error message when syntax is not valid diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserTypeTypes.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserTypeTypes.java index 848c4e71cc3..57cd59ac0b6 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserTypeTypes.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserTypeTypes.java @@ -15,9 +15,9 @@ ********************************************************************************/ package org.eclipse.rse.ui.validators; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -36,8 +36,8 @@ public class ValidatorUserTypeTypes */ public ValidatorUserTypeTypes() { - setErrorMessages(SystemPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDTTYPES_EMPTY), - SystemPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDTTYPES_NOTVALID)); + setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDTTYPES_EMPTY), + RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDTTYPES_NOTVALID)); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java index d0816a29162..66b014846a9 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java @@ -32,7 +32,6 @@ import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.rse.core.SystemAdapterHelpers; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.internal.subsystems.AbstractResource; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; @@ -47,6 +46,7 @@ import org.eclipse.rse.model.SystemWorkspaceResourceSet; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemPropertyResources; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemDynamicPopupMenuExtensionManager; @@ -330,7 +330,7 @@ public abstract class AbstractSystemViewAdapter { // system view adapter menu extensions // these extensions are independent of subsystem factories and are contributed via extension point - SystemDynamicPopupMenuExtensionManager.getInstance().populateMenu(shell, menu.getMenuManager(), selection, menuGroup); + SystemDynamicPopupMenuExtensionManager.getInstance().populateMenu(shell, menu, selection, menuGroup); } /** @@ -1517,7 +1517,7 @@ public abstract class AbstractSystemViewAdapter else adapter = (ISystemViewElementAdapter)((IAdaptable)o).getAdapter(ISystemViewElementAdapter.class); if (adapter == null) - SystemPlugin.logDebugMessage(this.getClass().getName(), "ADAPTER IS NULL FOR ELEMENT : " + o); + RSEUIPlugin.logDebugMessage(this.getClass().getName(), "ADAPTER IS NULL FOR ELEMENT : " + o); else { adapter.setViewer(getViewer()); // added this in V5.0, just in case. Phil @@ -1658,9 +1658,9 @@ public abstract class AbstractSystemViewAdapter */ protected void initMsgObjects() { - nullObject = new SystemMessageObject(SystemPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_EMPTY),ISystemMessageObject.MSGTYPE_EMPTY, null); - canceledObject = new SystemMessageObject(SystemPlugin.getPluginMessage(ISystemMessages.MSG_LIST_CANCELLED),ISystemMessageObject.MSGTYPE_CANCEL, null); - errorObject = new SystemMessageObject(SystemPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FAILED),ISystemMessageObject.MSGTYPE_ERROR, null); + nullObject = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_EMPTY),ISystemMessageObject.MSGTYPE_EMPTY, null); + canceledObject = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_LIST_CANCELLED),ISystemMessageObject.MSGTYPE_CANCEL, null); + errorObject = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FAILED),ISystemMessageObject.MSGTYPE_ERROR, null); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemDragDropAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemDragDropAdapter.java index cd013a28684..28654fee896 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemDragDropAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemDragDropAdapter.java @@ -22,7 +22,6 @@ import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.model.ISystemResourceSet; import org.eclipse.rse.model.SystemRemoteResourceSet; - public interface ISystemDragDropAdapter extends IRemoteObjectIdentifier { @@ -65,7 +64,7 @@ public interface ISystemDragDropAdapter extends IRemoteObjectIdentifier public boolean canDrop(Object element); /** - * Perform drop from the "from" object to the "to" object + * Perform drop from the "from" object to the "to" object * @param from the source object 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 @@ -77,7 +76,7 @@ public interface ISystemDragDropAdapter extends IRemoteObjectIdentifier public Object doDrop(Object from, Object to, boolean sameSystemType, boolean sameSystem, int srcType, IProgressMonitor monitor); /** - * Perform drop from the "fromSet" of objects to the "to" object + * Perform drop from the "fromSet" of objects to the "to" object * @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 @@ -86,7 +85,6 @@ public interface ISystemDragDropAdapter extends IRemoteObjectIdentifier * @param monitor the progress monitor * * @return the set of new objects created from the drop - * */ public ISystemResourceSet doDrop(ISystemResourceSet fromSet, Object to, boolean sameSystemType, boolean sameSystem, int srcType, IProgressMonitor monitor); @@ -111,7 +109,6 @@ public interface ISystemDragDropAdapter extends IRemoteObjectIdentifier /** * Get the subsystem that corresponds to this object if one exists. - * */ public ISubSystem getSubSystem(Object element); } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubsystemFactoryAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubsystemFactoryAdapter.java index 5a2f2989a13..447105b12b3 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubsystemFactoryAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubsystemFactoryAdapter.java @@ -30,7 +30,6 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.wizard.IWizard; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.servicesubsystem.IServiceSubSystemConfiguration; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; @@ -49,6 +48,7 @@ import org.eclipse.rse.model.ISystemProfile; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.ISystemAction; import org.eclipse.rse.ui.actions.SystemClearPasswordAction; @@ -488,7 +488,7 @@ public class SubsystemFactoryAdapter implements ISubsystemConfigurationAdapter, SystemFilterPoolReferenceManager refMgr = selectedSubSystem.getSystemFilterPoolReferenceManager(); SystemFilterPool[] refdPools = refMgr.getReferencedSystemFilterPools(); if ( refdPools.length == 0 ) - SystemPlugin.logInfo("SubSystemFactoryImpl::getSubSystemActions - getReferencedSystemFilterPools returned array of lenght zero."); + RSEUIPlugin.logInfo("SubSystemFactoryImpl::getSubSystemActions - getReferencedSystemFilterPools returned array of lenght zero."); for (int idx=0; idx 0 ) @@ -625,7 +625,7 @@ public class SubsystemFactoryAdapter implements ISubsystemConfigurationAdapter, { boolean anyAdded = false; SystemFilterPoolWrapperInformation poolWrapperInfo = getNewFilterWizardPoolWrapperInformation(); - ISystemProfile[] activeProfiles = SystemPlugin.getTheSystemRegistry().getActiveSystemProfiles(); + ISystemProfile[] activeProfiles = RSEUIPlugin.getTheSystemRegistry().getActiveSystemProfiles(); ISystemProfile activeProfile = selectedSubSystem.getHost().getSystemProfile(); for (int idx = 0; idx < activeProfiles.length; idx++) { @@ -676,10 +676,10 @@ public class SubsystemFactoryAdapter implements ISubsystemConfigurationAdapter, { IAction[] actions = new IAction[2]; actions[0] = new SystemFilterNewFilterPoolAction(shell); - ((ISystemAction) actions[0]).setHelp(SystemPlugin.HELPPREFIX + "actn0040"); - ((SystemFilterNewFilterPoolAction) actions[0]).setDialogHelp(SystemPlugin.HELPPREFIX + "wnfp0000"); + ((ISystemAction) actions[0]).setHelp(RSEUIPlugin.HELPPREFIX + "actn0040"); + ((SystemFilterNewFilterPoolAction) actions[0]).setDialogHelp(RSEUIPlugin.HELPPREFIX + "wnfp0000"); actions[1] = new SystemFilterCascadingNewFilterPoolReferenceAction(shell, selectedSubSystem.getSystemFilterPoolReferenceManager()); - ((ISystemAction) actions[1]).setHelp(SystemPlugin.HELPPREFIX + "actn0041"); + ((ISystemAction) actions[1]).setHelp(RSEUIPlugin.HELPPREFIX + "actn0041"); return actions; } /** @@ -706,7 +706,7 @@ public class SubsystemFactoryAdapter implements ISubsystemConfigurationAdapter, */ public ImageDescriptor getSystemFilterPoolManagerImage() { - return SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROFILE_ID); + return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROFILE_ID); } /** * Supply the image to be used for filter pools, within actions. @@ -714,7 +714,7 @@ public class SubsystemFactoryAdapter implements ISubsystemConfigurationAdapter, */ public ImageDescriptor getSystemFilterPoolImage(ISystemFilterPool filterPool) { - return SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERPOOL_ID); + return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERPOOL_ID); } /** * Supply the image to be used for filters, within actions. @@ -722,7 +722,7 @@ public class SubsystemFactoryAdapter implements ISubsystemConfigurationAdapter, */ public ImageDescriptor getSystemFilterImage(ISystemFilter filter) { - return SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTER_ID); + return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTER_ID); } /* * Supply the image to be used for the given filter string, within actions. @@ -739,7 +739,7 @@ public class SubsystemFactoryAdapter implements ISubsystemConfigurationAdapter, */ public ImageDescriptor getSystemFilterStringImage(String filterStringString) { - return SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERSTRING_ID); + return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERSTRING_ID); } @@ -794,12 +794,12 @@ public class SubsystemFactoryAdapter implements ISubsystemConfigurationAdapter, filterPoolActions = new IAction[nbr]; SystemFilterCopyFilterPoolAction copyAction = new SystemFilterCopyFilterPoolAction(shell); copyAction.setPromptString(SystemResources.RESID_COPY_TARGET_PROFILE_PROMPT); - copyAction.setHelp(SystemPlugin.HELPPREFIX + "actn0060"); - copyAction.setDialogHelp(SystemPlugin.HELPPREFIX + "dcfp0000"); + copyAction.setHelp(RSEUIPlugin.HELPPREFIX + "actn0060"); + copyAction.setDialogHelp(RSEUIPlugin.HELPPREFIX + "dcfp0000"); SystemFilterMoveFilterPoolAction moveAction = new SystemFilterMoveFilterPoolAction(shell); moveAction.setPromptString(SystemResources.RESID_MOVE_TARGET_PROFILE_PROMPT); - moveAction.setHelp(SystemPlugin.HELPPREFIX + "actn0061"); - moveAction.setDialogHelp(SystemPlugin.HELPPREFIX + "dmfp0000"); + moveAction.setHelp(RSEUIPlugin.HELPPREFIX + "actn0061"); + moveAction.setDialogHelp(RSEUIPlugin.HELPPREFIX + "dmfp0000"); filterPoolActions[0] = copyAction; filterPoolActions[1] = moveAction; } @@ -859,8 +859,8 @@ public class SubsystemFactoryAdapter implements ISubsystemConfigurationAdapter, protected IAction getNewFilterPoolFilterAction(ISubSystemConfiguration factory, ISystemFilterPool selectedPool, Shell shell) { SystemNewFilterAction action = new SystemNewFilterAction(shell, selectedPool); - action.setHelp(SystemPlugin.HELPPREFIX + "actn0042"); - action.setDialogHelp(SystemPlugin.HELPPREFIX + "wnfr0000"); + action.setHelp(RSEUIPlugin.HELPPREFIX + "actn0042"); + action.setDialogHelp(RSEUIPlugin.HELPPREFIX + "wnfr0000"); return action; } /** @@ -892,8 +892,8 @@ public class SubsystemFactoryAdapter implements ISubsystemConfigurationAdapter, return null; }*/ SystemChangeFilterAction action = new SystemChangeFilterAction(shell); - action.setHelp(SystemPlugin.HELPPREFIX + "actn0081"); - action.setDialogHelp(SystemPlugin.HELPPREFIX + "dufr0000"); + action.setHelp(RSEUIPlugin.HELPPREFIX + "actn0081"); + action.setDialogHelp(RSEUIPlugin.HELPPREFIX + "dufr0000"); return action; } /** @@ -1029,9 +1029,9 @@ public class SubsystemFactoryAdapter implements ISubsystemConfigurationAdapter, filterPoolReferenceActions = new IAction[nbr + nbrChildActions]; filterPoolReferenceActions[fpIdx++] = getRemoveFilterPoolReferenceAction(factory, selectedPool, shell); filterPoolReferenceActions[fpIdx] = new SystemFilterMoveUpFilterPoolReferenceAction(shell); - ((ISystemAction) filterPoolReferenceActions[fpIdx++]).setHelp(SystemPlugin.HELPPREFIX + "actn0063"); + ((ISystemAction) filterPoolReferenceActions[fpIdx++]).setHelp(RSEUIPlugin.HELPPREFIX + "actn0063"); filterPoolReferenceActions[fpIdx] = new SystemFilterMoveDownFilterPoolReferenceAction(shell); - ((ISystemAction) filterPoolReferenceActions[fpIdx++]).setHelp(SystemPlugin.HELPPREFIX + "actn0064"); + ((ISystemAction) filterPoolReferenceActions[fpIdx++]).setHelp(RSEUIPlugin.HELPPREFIX + "actn0064"); } if (childActions != null) @@ -1063,7 +1063,7 @@ public class SubsystemFactoryAdapter implements ISubsystemConfigurationAdapter, protected IAction getRemoveFilterPoolReferenceAction(ISubSystemConfiguration factory, ISystemFilterPool selectedPool, Shell shell) { ISystemAction action = new SystemFilterRemoveFilterPoolReferenceAction(shell); - action.setHelp(SystemPlugin.HELPPREFIX + "actn0062"); + action.setHelp(RSEUIPlugin.HELPPREFIX + "actn0062"); return action; } @@ -1140,8 +1140,8 @@ public class SubsystemFactoryAdapter implements ISubsystemConfigurationAdapter, filterActions = new IAction[additionalActions]; SystemFilterCopyFilterAction copyAction = new SystemFilterCopyFilterAction(shell); copyAction.setPromptString(SystemResources.RESID_COPY_TARGET_FILTERPOOL_PROMPT); - copyAction.setHelp(SystemPlugin.HELPPREFIX + "actn0082"); - copyAction.setDialogHelp(SystemPlugin.HELPPREFIX + "dcfr0000"); + copyAction.setHelp(RSEUIPlugin.HELPPREFIX + "actn0082"); + copyAction.setDialogHelp(RSEUIPlugin.HELPPREFIX + "dcfr0000"); filterActions[fsIdx++] = copyAction; // we want to make sure the order is kept consistent at @@ -1153,14 +1153,14 @@ public class SubsystemFactoryAdapter implements ISubsystemConfigurationAdapter, SystemFilterMoveFilterAction moveAction = new SystemFilterMoveFilterAction(shell); moveAction.setPromptString(SystemResources.RESID_MOVE_TARGET_FILTERPOOL_PROMPT); - moveAction.setHelp(SystemPlugin.HELPPREFIX + "actn0083"); - moveAction.setDialogHelp(SystemPlugin.HELPPREFIX + "dmfr0000"); + moveAction.setHelp(RSEUIPlugin.HELPPREFIX + "actn0083"); + moveAction.setDialogHelp(RSEUIPlugin.HELPPREFIX + "dmfr0000"); filterActions[fsIdx++] = moveAction; filterActions[fsIdx] = new SystemFilterMoveUpFilterAction(shell); - ((SystemFilterMoveUpFilterAction) filterActions[fsIdx++]).setHelp(SystemPlugin.HELPPREFIX + "actn0084"); + ((SystemFilterMoveUpFilterAction) filterActions[fsIdx++]).setHelp(RSEUIPlugin.HELPPREFIX + "actn0084"); filterActions[fsIdx] = new SystemFilterMoveDownFilterAction(shell); - ((SystemFilterMoveDownFilterAction) filterActions[fsIdx++]).setHelp(SystemPlugin.HELPPREFIX + "actn0085"); + ((SystemFilterMoveDownFilterAction) filterActions[fsIdx++]).setHelp(RSEUIPlugin.HELPPREFIX + "actn0085"); } // add overridable dynamic actions if (factory.supportsNestedFilters()) @@ -1289,19 +1289,19 @@ public class SubsystemFactoryAdapter implements ISubsystemConfigurationAdapter, { filterStringActions = new IAction[4]; filterStringActions[0] = new SystemFilterMoveUpFilterStringAction(shell); - ((ISystemAction)filterStringActions[0]).setHelp(SystemPlugin.HELPPREFIX+"actn0093"); + ((ISystemAction)filterStringActions[0]).setHelp(RSEUIPlugin.HELPPREFIX+"actn0093"); filterStringActions[1] = new SystemFilterMoveDownFilterStringAction(shell); - ((ISystemAction)filterStringActions[1]).setHelp(SystemPlugin.HELPPREFIX+"actn0094"); + ((ISystemAction)filterStringActions[1]).setHelp(RSEUIPlugin.HELPPREFIX+"actn0094"); SystemFilterCopyFilterStringAction copyAction = new SystemFilterCopyFilterStringAction(shell); copyAction.setPromptString(SystemResources.RESID_COPY_TARGET_FILTER_PROMPT)); - copyAction.setHelp(SystemPlugin.HELPPREFIX+"actn0091"); - copyAction.setDialogHelp(SystemPlugin.HELPPREFIX+"dcfs0000"); + copyAction.setHelp(RSEUIPlugin.HELPPREFIX+"actn0091"); + copyAction.setDialogHelp(RSEUIPlugin.HELPPREFIX+"dcfs0000"); filterStringActions[2] = copyAction; SystemFilterMoveFilterStringAction moveAction = new SystemFilterMoveFilterStringAction(shell); moveAction.setPromptString(SystemResources.RESID_MOVE_TARGET_FILTER_PROMPT)); - moveAction.setHelp(SystemPlugin.HELPPREFIX+"actn0093"); - moveAction.setDialogHelp(SystemPlugin.HELPPREFIX+"dmfs0000"); + moveAction.setHelp(RSEUIPlugin.HELPPREFIX+"actn0093"); + moveAction.setDialogHelp(RSEUIPlugin.HELPPREFIX+"dmfs0000"); filterStringActions[3] = moveAction; } IAction chgAction = getChangeFilterStringAction(selectedFilterString, shell); @@ -1417,7 +1417,7 @@ public class SubsystemFactoryAdapter implements ISubsystemConfigurationAdapter, */ public void renameSubSystemProfile(ISubSystemConfiguration factory, String oldProfileName, String newProfileName) { - //SystemPlugin.logDebugMessage(this.getClass().getName(), "Inside renameSubSystemProfile. newProfileName = "+newProfileName); + //RSEUIPlugin.logDebugMessage(this.getClass().getName(), "Inside renameSubSystemProfile. newProfileName = "+newProfileName); ISystemProfile profile = factory.getSystemProfile(newProfileName); factory.renameFilterPoolManager(profile); // update filter pool manager name //if (profile.isDefaultPrivate()) // I don't remember why this was here, but it caused bad things, Phil. 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 35004908c6a..9a9de5f2495 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 @@ -18,11 +18,11 @@ package org.eclipse.rse.ui.view; import org.eclipse.core.runtime.Platform; import org.eclipse.jface.viewers.Viewer; import org.eclipse.rse.core.SystemAdapterHelpers; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.ISystemMessageObject; import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.SystemMessageObject; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.widgets.Shell; @@ -53,7 +53,7 @@ public abstract class SystemAbstractAPIProvider public SystemAbstractAPIProvider() { super(); - sr = SystemPlugin.getTheSystemRegistry(); + sr = RSEUIPlugin.getTheSystemRegistry(); } /** @@ -132,9 +132,9 @@ public abstract class SystemAbstractAPIProvider private void initMsgObjects() { - nullObject = new SystemMessageObject(SystemPlugin.getPluginMessage(MSG_EXPAND_EMPTY),ISystemMessageObject.MSGTYPE_EMPTY, null); - canceledObject = new SystemMessageObject(SystemPlugin.getPluginMessage(MSG_LIST_CANCELLED),ISystemMessageObject.MSGTYPE_CANCEL, null); - errorObject = new SystemMessageObject(SystemPlugin.getPluginMessage(MSG_EXPAND_FAILED),ISystemMessageObject.MSGTYPE_ERROR, null); + nullObject = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_EXPAND_EMPTY),ISystemMessageObject.MSGTYPE_EMPTY, null); + canceledObject = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_LIST_CANCELLED),ISystemMessageObject.MSGTYPE_CANCEL, null); + errorObject = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_EXPAND_FAILED),ISystemMessageObject.MSGTYPE_ERROR, null); } /** 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 f8c3b6e0486..66e5daa8771 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 @@ -27,7 +27,6 @@ import org.eclipse.core.runtime.Status; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.filters.ISystemFilterReference; @@ -42,6 +41,7 @@ import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.GenericMessages; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.ui.progress.UIJob; @@ -521,7 +521,7 @@ public class SystemDNDTransferRunnable extends UIJob } } - SystemMessage copyMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COPYGENERIC_PROGRESS); + SystemMessage copyMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYGENERIC_PROGRESS); if (monitor != null) monitor.beginTask(copyMessage.getLevelOneText(), IProgressMonitor.UNKNOWN); @@ -542,7 +542,7 @@ public class SystemDNDTransferRunnable extends UIJob monitor.done(); } // always refresh - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); if (target != null && target instanceof ISystemContainer) { @@ -592,14 +592,14 @@ public class SystemDNDTransferRunnable extends UIJob private void showInvalidTransferMessage(String srcPath, String targetPath) { - SystemMessage errorMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_TRANSFER_INVALID); + SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_TRANSFER_INVALID); errorMessage.makeSubstitution(srcPath, targetPath); showErrorMessage(errorMessage); } private void showInvalidTransferMessage(ISystemResourceSet resourceSet, String targetPath) { - SystemMessage errorMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_TRANSFER_INVALID); + SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_TRANSFER_INVALID); errorMessage.makeSubstitution(resourceSet.toString(), targetPath); showErrorMessage(errorMessage); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemDropActionDelegate.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemDropActionDelegate.java index 9b5b8b4c70c..b62862a6b6d 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemDropActionDelegate.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemDropActionDelegate.java @@ -20,7 +20,7 @@ import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableContext; -import org.eclipse.rse.core.SystemPlugin; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.part.IDropActionDelegate; @@ -133,7 +133,7 @@ public class SystemDropActionDelegate implements IDropActionDelegate { } } - SystemPlugin.getTheSystemRegistry().clearRunnableContext(); + RSEUIPlugin.getTheSystemRegistry().clearRunnableContext(); } } catch (SystemMessageException e) @@ -148,14 +148,14 @@ public class SystemDropActionDelegate implements IDropActionDelegate protected IRunnableContext getRunnableContext(Shell shell) { - IRunnableContext irc = SystemPlugin.getTheSystemRegistry().getRunnableContext(); + IRunnableContext irc = RSEUIPlugin.getTheSystemRegistry().getRunnableContext(); if (irc != null) { return irc; } irc = new ProgressMonitorDialog(shell); - SystemPlugin.getTheSystemRegistry().setRunnableContext(shell, irc); + RSEUIPlugin.getTheSystemRegistry().setRunnableContext(shell, irc); return irc; } } \ No newline at end of file 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 e19abeb66d9..5db1317b549 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,12 +27,12 @@ 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.SystemPlugin; 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; import org.eclipse.rse.ui.dialogs.SystemPromptDialog; import org.eclipse.rse.ui.messages.ISystemMessageLine; @@ -301,7 +301,7 @@ public class SystemResourceSelectionForm implements ISelectionChangedListener ISystemViewElementAdapter adapter = getAdapter(selection); if (adapter != null) { - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); ISubSystem ss = adapter.getSubSystem(selection); IHost connection = ss.getHost(); if (_inputProvider.allowMultipleConnections()) 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 6fd2249b834..ee8b4ee4a8e 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,10 +15,10 @@ ********************************************************************************/ package org.eclipse.rse.ui.view; -import org.eclipse.rse.core.SystemPlugin; 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; public abstract class SystemResourceSelectionInputProvider extends SystemAbstractAPIProvider @@ -78,7 +78,7 @@ public abstract class SystemResourceSelectionInputProvider extends SystemAbstrac { if (_connection == null) { - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); _connection = registry.getHosts()[0]; } 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 c6a923bca4e..ea9049b0f5c 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 @@ -127,7 +127,7 @@ public class SystemSelectRemoteObjectAPIProviderImpl /** * Specify system types to restrict what types of connections the user can create, and see. * This will override subsystemFactoryId,if that has been set! - * @see org.eclipse.rse.core.ISystemTypes + * @see org.eclipse.rse.core.IRSESystemType */ public void setSystemTypes(String[] systemTypes) { 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 d6a6a23a5ff..0036dadcc68 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 @@ -45,7 +45,6 @@ import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.window.SameShellProvider; import org.eclipse.rse.core.SystemAdapterHelpers; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemPopupMenuActionContributorManager; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.model.IHost; @@ -63,6 +62,7 @@ import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.ISystemRenameTarget; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemPropertyResources; import org.eclipse.rse.ui.actions.ISystemAction; import org.eclipse.rse.ui.actions.SystemCommonDeleteAction; @@ -174,8 +174,8 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec public HeaderSelectionListener() { - _upI = SystemPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID); - _downI = SystemPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID); + _upI = RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID); + _downI = RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID); } @@ -317,8 +317,8 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec addSelectionChangedListener(this); - SystemPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this); - SystemPlugin.getTheSystemRegistry().addSystemRemoteChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().addSystemRemoteChangeListener(this); initDragAndDrop(); @@ -1110,8 +1110,8 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec // remove listeners removeSelectionChangedListener(this); - SystemPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this); - SystemPlugin.getTheSystemRegistry().removeSystemRemoteChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().removeSystemRemoteChangeListener(this); Composite tree = getTableTree(); @@ -1258,7 +1258,7 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec */ public boolean doDelete(IProgressMonitor monitor) { - ISystemRegistry sr = SystemPlugin.getDefault().getSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); IStructuredSelection selection = (IStructuredSelection) getSelection(); Iterator elements = selection.iterator(); //int selectedCount = selection.size(); @@ -1295,7 +1295,7 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec String msg = exc.getMessage(); if ((msg == null) || (exc instanceof ClassCastException)) msg = exc.getClass().getName(); - SystemMessageDialog.displayErrorMessage(getShell(), SystemPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_DELETING).makeSubstitution(element, msg)); + SystemMessageDialog.displayErrorMessage(getShell(), RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_DELETING).makeSubstitution(element, msg)); ok = false; } if (anyOk) @@ -1351,7 +1351,7 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec */ public boolean doRename(String[] newNames) { - ISystemRegistry sr = SystemPlugin.getDefault().getSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); IStructuredSelection selection = (IStructuredSelection) getSelection(); Iterator elements = selection.iterator(); int selectedCount = selection.size(); @@ -1396,7 +1396,7 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec //String msg = exc.getMessage(); //if ((msg == null) || (exc instanceof ClassCastException)) // msg = exc.getClass().getName(); - SystemMessageDialog.displayErrorMessage(getShell(), SystemPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_RENAMING).makeSubstitution(element, exc), + SystemMessageDialog.displayErrorMessage(getShell(), RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_RENAMING).makeSubstitution(element, exc), //msg), exc); ok = false; 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 3208ba51f29..9cf129c9022 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 @@ -45,7 +45,6 @@ import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.window.SameShellProvider; import org.eclipse.rse.core.SystemAdapterHelpers; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemPopupMenuActionContributorManager; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.filters.ISystemFilterReference; @@ -66,6 +65,7 @@ import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.ISystemRenameTarget; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemPropertyResources; import org.eclipse.rse.ui.actions.ISystemAction; import org.eclipse.rse.ui.actions.SystemCommonDeleteAction; @@ -166,8 +166,8 @@ public class SystemTableView public HeaderSelectionListener() { - _upI = SystemPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID); - _downI = SystemPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID); + _upI = RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID); + _downI = RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID); } @@ -292,7 +292,7 @@ public class SystemTableView setContentProvider(_provider); - setLabelProvider(new SystemDecoratingLabelProvider(_provider, SystemPlugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator())); + setLabelProvider(new SystemDecoratingLabelProvider(_provider, RSEUIPlugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator())); //setLabelProvider(_provider); _filter = new SystemTableViewFilter(); @@ -309,8 +309,8 @@ public class SystemTableView addSelectionChangedListener(this); - SystemPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this); - SystemPlugin.getTheSystemRegistry().addSystemRemoteChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().addSystemRemoteChangeListener(this); initDragAndDrop(); @@ -333,8 +333,8 @@ public class SystemTableView }); - _upI = SystemPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_ARROW_UP_ID); - _downI = SystemPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_ARROW_DOWN_ID); + _upI = RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_ARROW_UP_ID); + _downI = RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_ARROW_DOWN_ID); } protected SystemTableViewProvider getProvider() @@ -915,7 +915,7 @@ public class SystemTableView case ISystemResourceChangeEvents.EVENT_REFRESH: { - if (child == SystemPlugin.getTheSystemRegistry()) + if (child == RSEUIPlugin.getTheSystemRegistry()) { // treat this as refresh all child = _objectInput; @@ -1184,8 +1184,8 @@ public class SystemTableView public void dispose() { removeSelectionChangedListener(this); - SystemPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this); - SystemPlugin.getTheSystemRegistry().removeSystemRemoteChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().removeSystemRemoteChangeListener(this); _menuManager.removeAll(); Table table = getTable(); @@ -1405,7 +1405,7 @@ public class SystemTableView */ public boolean doDelete(IProgressMonitor monitor) { - ISystemRegistry sr = SystemPlugin.getDefault().getSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); IStructuredSelection selection = (IStructuredSelection) getSelection(); Iterator elements = selection.iterator(); //int selectedCount = selection.size(); @@ -1442,7 +1442,7 @@ public class SystemTableView String msg = exc.getMessage(); if ((msg == null) || (exc instanceof ClassCastException)) msg = exc.getClass().getName(); - SystemMessageDialog.displayErrorMessage(getShell(), SystemPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_DELETING).makeSubstitution(element, msg)); + SystemMessageDialog.displayErrorMessage(getShell(), RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_DELETING).makeSubstitution(element, msg)); ok = false; } if (anyOk) @@ -1498,7 +1498,7 @@ public class SystemTableView */ public boolean doRename(String[] newNames) { - ISystemRegistry sr = SystemPlugin.getDefault().getSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); IStructuredSelection selection = (IStructuredSelection) getSelection(); Iterator elements = selection.iterator(); int selectedCount = selection.size(); @@ -1552,7 +1552,7 @@ public class SystemTableView //String msg = exc.getMessage(); //if ((msg == null) || (exc instanceof ClassCastException)) // msg = exc.getClass().getName(); - SystemMessageDialog.displayErrorMessage(getShell(), SystemPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_RENAMING).makeSubstitution(element, exc), + SystemMessageDialog.displayErrorMessage(getShell(), RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_RENAMING).makeSubstitution(element, exc), //msg), exc); ok = false; 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 ff12ddd9a26..f59f6855f8e 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 @@ -42,7 +42,6 @@ import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.window.Window; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemPreferencesManager; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.filters.ISystemFilterReference; @@ -59,6 +58,7 @@ import org.eclipse.rse.model.ISystemResourceChangeListener; import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemPropertyResources; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; @@ -260,7 +260,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, public LockAction() { super(); - setImageDescriptor(SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_LOCK_ID)); + setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_LOCK_ID)); String label = determineLabel(); setText(label); setToolTipText(label); @@ -317,8 +317,8 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, public RefreshAction() { super(SystemResources.ACTION_REFRESH_LABEL, - //SystemPlugin.getDefault().getImageDescriptor(ICON_SYSTEM_REFRESH_ID)); - SystemPlugin.getDefault().getImageDescriptorFromIDE(ISystemIconConstants.ICON_IDE_REFRESH_ID)); + //RSEUIPlugin.getDefault().getImageDescriptor(ICON_SYSTEM_REFRESH_ID)); + RSEUIPlugin.getDefault().getImageDescriptorFromIDE(ISystemIconConstants.ICON_IDE_REFRESH_ID)); } public void run() @@ -329,7 +329,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, ((ISystemContainer)inputObject).markStale(true); } ((SystemTableViewProvider) _viewer.getContentProvider()).flushCache(); - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); registry.fireEvent(new SystemResourceChangeEvent(inputObject, ISystemResourceChangeEvents.EVENT_REFRESH, inputObject)); //_viewer.refresh(); @@ -387,7 +387,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, Object inputObject = _viewer.getInput(); if (inputObject == null) { - inputObject = SystemPlugin.getTheSystemRegistry(); + inputObject = RSEUIPlugin.getTheSystemRegistry(); } dlg.setInputObject(inputObject); if (dlg.open() == Window.OK) @@ -451,7 +451,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, private void setHelp() { - setHelp(SystemPlugin.HELPPREFIX + "gnpt0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "gnpt0000"); } } @@ -564,7 +564,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, private void setHelp() { - setHelp(SystemPlugin.HELPPREFIX + "gnss0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "gnss0000"); } } @@ -632,7 +632,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, String filterID = memento.getString(TAG_TABLE_VIEW_FILTER_ID); String objectID = memento.getString(TAG_TABLE_VIEW_OBJECT_ID); - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); Object input = null; if (subsystemId == null) { @@ -1007,7 +1007,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, private void setHelp() { - setHelp(SystemPlugin.HELPPREFIX + "gntc0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "gntc0000"); } } @@ -1015,7 +1015,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, { super(SystemResources.ACTION_SELECTCOLUMNS_LABEL, null); setToolTipText(SystemResources.ACTION_SELECTCOLUMNS_TOOLTIP); - setImageDescriptor(SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTER_ID)); + setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTER_ID)); } public void checkEnabledState() @@ -1106,7 +1106,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, } else { - setInput(SystemPlugin.getTheSystemRegistry()); + setInput(RSEUIPlugin.getTheSystemRegistry()); } } @@ -1151,7 +1151,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, _browsePosition = 0; // register global edit actions - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); Clipboard clipboard = registry.getSystemClipboard(); CellEditorActionHandler editorActionHandler = new CellEditorActionHandler(getViewSite().getActionBars()); @@ -1168,7 +1168,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, registry.addSystemResourceChangeListener(this); registry.addSystemRemoteChangeListener(this); - SystemWidgetHelpers.setHelp(_viewer.getControl(), SystemPlugin.HELPPREFIX + "sysd0000"); + SystemWidgetHelpers.setHelp(_viewer.getControl(), RSEUIPlugin.HELPPREFIX + "sysd0000"); getSite().registerContextMenu(_viewer.getContextMenuManager(), _viewer); } @@ -1216,7 +1216,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, selectionService.removeSelectionListener(this); _viewer.removeSelectionChangedListener(this); - SystemPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this); if (_viewer != null) { _viewer.dispose(); @@ -1626,7 +1626,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, private void restoreState(IMemento memento) { RestoreStateRunnable rsr = new RestoreStateRunnable(memento); - rsr.setRule(SystemPlugin.getTheSystemRegistry()); + rsr.setRule(RSEUIPlugin.getTheSystemRegistry()); rsr.schedule(); _memento = null; } @@ -1687,7 +1687,7 @@ public class SystemTableViewPart extends ViewPart implements ISelectionListener, ISubSystem subsystem = va.getSubSystem(input); if (subsystem != null) { - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); String subsystemID = registry.getAbsoluteNameForSubSystem(subsystem); String profileID = subsystem.getHost().getSystemProfileName(); String connectionID = subsystem.getHost().getAliasName(); 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 58a70927a83..3f86aef0568 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,12 +16,12 @@ package org.eclipse.rse.ui.view; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.model.IHost; import org.eclipse.rse.model.ISystemMessageObject; import org.eclipse.rse.model.SystemMessageObject; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -55,9 +55,9 @@ public class SystemTestFilterStringAPIProviderImpl private void initMsgObjects() { - nullObject = new SystemMessageObject(SystemPlugin.getPluginMessage(MSG_EXPAND_EMPTY),ISystemMessageObject.MSGTYPE_EMPTY, null); - canceledObject = new SystemMessageObject(SystemPlugin.getPluginMessage(MSG_LIST_CANCELLED),ISystemMessageObject.MSGTYPE_CANCEL, null); - errorObject = new SystemMessageObject(SystemPlugin.getPluginMessage(MSG_EXPAND_FAILED),ISystemMessageObject.MSGTYPE_ERROR, null); + nullObject = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_EXPAND_EMPTY),ISystemMessageObject.MSGTYPE_EMPTY, null); + canceledObject = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_LIST_CANCELLED),ISystemMessageObject.MSGTYPE_CANCEL, null); + errorObject = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_EXPAND_FAILED),ISystemMessageObject.MSGTYPE_ERROR, null); } /** 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 dc8200f5633..85d11972743 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 @@ -49,7 +49,6 @@ import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jface.window.SameShellProvider; import org.eclipse.rse.core.SystemAdapterHelpers; import org.eclipse.rse.core.SystemElapsedTimer; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemPopupMenuActionContributorManager; import org.eclipse.rse.core.SystemPreferencesManager; import org.eclipse.rse.core.subsystems.ISubSystem; @@ -85,6 +84,7 @@ import org.eclipse.rse.ui.ISystemDeleteTarget; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.ISystemRenameTarget; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.ISystemAction; import org.eclipse.rse.ui.actions.SystemCascadingGoToAction; @@ -358,7 +358,7 @@ public class SystemView extends TreeViewer implements ISystemTree, */ public void setLabelAndContentProvider(SystemViewLabelAndContentProvider lcProvider) { - setLabelProvider(new DecoratingLabelProvider(lcProvider, SystemPlugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator())); + setLabelProvider(new DecoratingLabelProvider(lcProvider, RSEUIPlugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator())); setContentProvider(lcProvider); } @@ -398,8 +398,8 @@ public class SystemView extends TreeViewer implements ISystemTree, // ---------------------------------------- // register with system registry for events // ---------------------------------------- - SystemPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this); - SystemPlugin.getTheSystemRegistry().addSystemRemoteChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().addSystemRemoteChangeListener(this); // ----------------------------- // Enable right-click popup menu // ----------------------------- @@ -937,7 +937,7 @@ public class SystemView extends TreeViewer implements ISystemTree, item.setInputs(getShell(), this, selection); } catch (Exception e) { - SystemPlugin.logError("Error configuring action " + item.getClass().getName(),e); + RSEUIPlugin.logError("Error configuring action " + item.getClass().getName(),e); } } else if (items[idx] instanceof SystemSubMenuManager) @@ -1199,7 +1199,7 @@ public class SystemView extends TreeViewer implements ISystemTree, { if (!debugProperties) return; - //SystemPlugin.logDebugMessage(prefix, msg); + //RSEUIPlugin.logDebugMessage(prefix, msg); System.out.println(prefix+" "+msg); } @@ -1471,9 +1471,9 @@ public class SystemView extends TreeViewer implements ISystemTree, public void handleDispose(DisposeEvent event) { //if (debug) - //SystemPlugin.logDebugMessage(this.getClass().getName(),"Inside handleDispose for SystemView"); - SystemPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this); - SystemPlugin.getTheSystemRegistry().removeSystemRemoteChangeListener(this); + //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"Inside handleDispose for SystemView"); + RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().removeSystemRemoteChangeListener(this); busyCursor.dispose(); super.handleDispose(event); } @@ -1723,7 +1723,7 @@ public class SystemView extends TreeViewer implements ISystemTree, Object src = event.getSource(); Object parent = event.getParent(); String[] properties = new String[1]; - if (parent == SystemPlugin.getTheSystemRegistry()) + if (parent == RSEUIPlugin.getTheSystemRegistry()) parent = inputProvider; ISubSystem ss = null; Widget item = null; @@ -2063,7 +2063,7 @@ public class SystemView extends TreeViewer implements ISystemTree, // refresh(src); // ONLY VALID WHEN USER TRULY WANTS TO REQUERY CHILDREN FROM HOST //else // refresh(); // refresh entire tree - if ((src == null) || (src == SystemPlugin.getTheSystemRegistry())) + if ((src == null) || (src == RSEUIPlugin.getTheSystemRegistry())) refreshAll(); else { @@ -2666,7 +2666,7 @@ public class SystemView extends TreeViewer implements ISystemTree, { boolean affected = false; IWorkbenchPart viewPart = getWorkbenchPart(); - if ((viewPart != null) && (getInput() != SystemPlugin.getTheSystemRegistry()) + if ((viewPart != null) && (getInput() != RSEUIPlugin.getTheSystemRegistry()) && !(getInput() instanceof SystemEmptyListAPIProviderImpl)) { for (int idx=0; !affected && (idx allow empty? No. + RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_USERID_NOTVALID), + RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_USERID_EMPTY)); // false => allow empty? No. userIdDescriptor.setValidator(userIdValidator); propertyDescriptorArray[++idx] = userIdDescriptor; propertyDescriptorArray[idx].setDescription(SystemViewResources.RESID_PROPERTY_DEFAULTUSERID_TOOLTIP); @@ -375,7 +380,7 @@ public class SystemViewConnectionAdapter } else { - boolean anyConnected = SystemPlugin.getTheSystemRegistry().isAnySubSystemConnected(conn); + boolean anyConnected = RSEUIPlugin.getTheSystemRegistry().isAnySubSystemConnected(conn); if (anyConnected) return SystemViewResources.RESID_PROPERTY_CONNECTIONSTATUS_CONNECTED_VALUE; else @@ -446,7 +451,7 @@ public class SystemViewConnectionAdapter //System.out.println("Inside resetPropertyValue in adapter"); String property = (String)propertyObject; IHost conn = (IHost)propertySourceInput; - ISystemRegistry sr = SystemPlugin.getDefault().getSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); if (property.equals(P_DEFAULTUSERID)) { @@ -474,7 +479,7 @@ public class SystemViewConnectionAdapter //if (!data.getIsLocal()) //whereToUpdate = USERID_LOCATION_DEFAULT_SYSTEMTYPE; String userId = data.getLocalValue(); // will be "" if !data.getIsLocal(), which results in wiping out local override - ISystemRegistry sr = SystemPlugin.getDefault().getSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(), conn.getHostName(), conn.getDescription(), userId, whereToUpdate); } @@ -486,7 +491,7 @@ public class SystemViewConnectionAdapter { String name = (String)property; IHost conn = (IHost)propertySourceInput; - ISystemRegistry sr = SystemPlugin.getDefault().getSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); if (name.equals(P_DEFAULTUSERID)) { @@ -530,8 +535,8 @@ public class SystemViewConnectionAdapter if (element instanceof IHost) { IHost sysCon = (IHost) element; - if (sysCon.getSystemType().equals(ISystemTypes.SYSTEMTYPE_LOCAL)) return existsMoreThanOneLocalConnection(); - ISystemRegistry sr = SystemPlugin.getDefault().getSystemRegistry(); + if (sysCon.getSystemType().equals(IRSESystemType.SYSTEMTYPE_LOCAL)) return existsMoreThanOneLocalConnection(); + ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); return !sr.isAnySubSystemConnected((IHost)element); } return true; @@ -539,7 +544,7 @@ public class SystemViewConnectionAdapter protected boolean existsMoreThanOneLocalConnection() { - IHost[] localCons = SystemPlugin.getDefault().getSystemRegistry().getHostsBySystemType(ISystemTypes.SYSTEMTYPE_LOCAL); + IHost[] localCons = RSEUIPlugin.getDefault().getSystemRegistry().getHostsBySystemType(IRSESystemType.SYSTEMTYPE_LOCAL); return localCons.length > 1; } @@ -550,7 +555,7 @@ public class SystemViewConnectionAdapter { boolean ok = true; IHost conn = (IHost)element; - ISystemRegistry sr = SystemPlugin.getDefault().getSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); sr.deleteHost(conn); return ok; } @@ -571,7 +576,7 @@ public class SystemViewConnectionAdapter { boolean ok = true; IHost conn = (IHost)element; - ISystemRegistry sr = SystemPlugin.getDefault().getSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); sr.renameHost(conn,name); // renames and saves to disk return ok; } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewConnectionSelectionInputProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewConnectionSelectionInputProvider.java index ac55c942ebb..e1c127cf4f9 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewConnectionSelectionInputProvider.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewConnectionSelectionInputProvider.java @@ -16,9 +16,9 @@ package org.eclipse.rse.ui.view; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.internal.model.SystemNewConnectionPromptObject; import org.eclipse.rse.model.IHost; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -82,9 +82,9 @@ public class SystemViewConnectionSelectionInputProvider extends SystemAbstractAP //System.out.println("Inside getSystemViewRoots. showNew = "+showNew); IHost[] conns = null; if (systemTypes == null) - conns = SystemPlugin.getTheSystemRegistry().getHosts(); + conns = RSEUIPlugin.getTheSystemRegistry().getHosts(); else - conns = SystemPlugin.getTheSystemRegistry().getHostsBySystemTypes(systemTypes); + conns = RSEUIPlugin.getTheSystemRegistry().getHostsBySystemTypes(systemTypes); if (showNew) { if ((conns == null) || (conns.length == 0)) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewDataDragAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewDataDragAdapter.java index 233832a6046..a537bea8cd7 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewDataDragAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewDataDragAdapter.java @@ -23,10 +23,10 @@ import org.eclipse.core.runtime.IAdaptable; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; 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; import org.eclipse.swt.dnd.DND; import org.eclipse.swt.dnd.DragSourceAdapter; import org.eclipse.swt.dnd.DragSourceEvent; @@ -78,13 +78,13 @@ public class SystemViewDataDragAdapter extends DragSourceAdapter if (dragObject instanceof ISubSystem) { subSystem = (ISubSystem)dragObject; - String subSystemId = SystemPlugin.getTheSystemRegistry().getAbsoluteNameForSubSystem(subSystem); + String subSystemId = RSEUIPlugin.getTheSystemRegistry().getAbsoluteNameForSubSystem(subSystem); dataStream.append(subSystemId); } else if (dragObject instanceof IHost) { IHost connection = (IHost)dragObject; - String connectionId = SystemPlugin.getTheSystemRegistry().getAbsoluteNameForConnection(connection); + String connectionId = RSEUIPlugin.getTheSystemRegistry().getAbsoluteNameForConnection(connection); dataStream.append(connectionId); } else @@ -93,7 +93,7 @@ public class SystemViewDataDragAdapter extends DragSourceAdapter if (subSystem != null) { - String subSystemId = SystemPlugin.getTheSystemRegistry().getAbsoluteNameForSubSystem(subSystem); + String subSystemId = RSEUIPlugin.getTheSystemRegistry().getAbsoluteNameForSubSystem(subSystem); dataStream.append(subSystemId); } @@ -107,7 +107,7 @@ public class SystemViewDataDragAdapter extends DragSourceAdapter public void dragStart(DragSourceEvent event) { ISelection selection = _selectionProvider.getSelection(); - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); if (selection instanceof IStructuredSelection) { IStructuredSelection ss = (IStructuredSelection) selection; @@ -170,7 +170,7 @@ public class SystemViewDataDragAdapter extends DragSourceAdapter public void dragSetData(DragSourceEvent event) { ISelection selection = _selectionProvider.getSelection(); - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); if (selection instanceof IStructuredSelection) { IStructuredSelection ss = (IStructuredSelection) selection; @@ -271,7 +271,7 @@ public class SystemViewDataDragAdapter extends DragSourceAdapter Iterator iterator = ss.iterator(); int i = 0; - IEditorRegistry editRegistry = SystemPlugin.getDefault().getWorkbench().getEditorRegistry(); + IEditorRegistry editRegistry = RSEUIPlugin.getDefault().getWorkbench().getEditorRegistry(); while (iterator.hasNext()) { @@ -330,7 +330,7 @@ public class SystemViewDataDragAdapter extends DragSourceAdapter protected IEditorRegistry getEditorRegistry() { - return SystemPlugin.getDefault().getWorkbench().getEditorRegistry(); + return RSEUIPlugin.getDefault().getWorkbench().getEditorRegistry(); } protected IEditorDescriptor getDefaultTextEditor() diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewDataDropAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewDataDropAdapter.java index 386d83dd6c6..290b85c1824 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewDataDropAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewDataDropAdapter.java @@ -27,7 +27,6 @@ import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.viewers.StructuredViewer; import org.eclipse.jface.viewers.ViewerDropAdapter; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.internal.model.SystemScratchpad; import org.eclipse.rse.model.ISystemProfile; @@ -35,6 +34,7 @@ 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.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.dnd.DND; import org.eclipse.swt.dnd.DropTargetEvent; import org.eclipse.swt.dnd.TransferData; @@ -241,7 +241,7 @@ public class SystemViewDataDropAdapter extends ViewerDropAdapter implements ISy */ private Object getObjectFor(String str) { - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); // first extract subsystem id int connectionDelim = str.indexOf(":"); if (connectionDelim == -1) // not subsystem, therefore likely to be a connection @@ -289,14 +289,14 @@ public class SystemViewDataDropAdapter extends ViewerDropAdapter implements ISy } else { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND); msg.makeSubstitution(srcKey, subSystem.getHostAliasName()); return msg; } } else { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_CONNECTION_NOTFOUND); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_CONNECTION_NOTFOUND); msg.makeSubstitution(subSystemId); return msg; } @@ -305,7 +305,7 @@ public class SystemViewDataDropAdapter extends ViewerDropAdapter implements ISy protected IRunnableContext getRunnableContext(Shell shell) { - IRunnableContext irc = SystemPlugin.getTheSystemRegistry().getRunnableContext(); + IRunnableContext irc = RSEUIPlugin.getTheSystemRegistry().getRunnableContext(); if (irc != null) { return irc; @@ -314,13 +314,13 @@ public class SystemViewDataDropAdapter extends ViewerDropAdapter implements ISy { /* // for other cases, use statusbar - IWorkbenchWindow win = SystemPlugin.getActiveWorkbenchWindow(); + IWorkbenchWindow win = RSEUIPlugin.getActiveWorkbenchWindow(); if (win != null) { - Shell winShell = SystemPlugin.getActiveWorkbenchShell(); + Shell winShell = RSEUIPlugin.getActiveWorkbenchShell(); if (winShell != null && !winShell.isDisposed() && winShell.isVisible()) { - SystemPlugin.logInfo("Using active workbench window as runnable context"); + RSEUIPlugin.logInfo("Using active workbench window as runnable context"); shell = winShell; return win; } @@ -332,7 +332,7 @@ public class SystemViewDataDropAdapter extends ViewerDropAdapter implements ISy */ irc = new ProgressMonitorDialog(shell); - SystemPlugin.getTheSystemRegistry().setRunnableContext(shell, irc); + RSEUIPlugin.getTheSystemRegistry().setRunnableContext(shell, irc); return irc; } } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterAdapter.java index 0a3a9c8a3b0..cb379543a82 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterAdapter.java @@ -23,7 +23,6 @@ import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.Viewer; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.core.subsystems.SubSystemHelpers; @@ -43,6 +42,7 @@ import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.validators.ISystemValidator; import org.eclipse.rse.ui.validators.ValidatorFilterName; @@ -107,7 +107,7 @@ public class SystemViewFilterAdapter extends AbstractSystemViewAdapter implement */ public ImageDescriptor getImageDescriptor(Object element) { - //return SystemPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_FILTER_ID); + //return RSEUIPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_FILTER_ID); ImageDescriptor filterImage = null; ISystemFilter filter = getFilter(element); if (filter.getProvider() != null) @@ -116,7 +116,7 @@ public class SystemViewFilterAdapter extends AbstractSystemViewAdapter implement filterImage = adapter.getSystemFilterImage(filter); } if (filterImage == null) - filterImage = SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTER_ID); + filterImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTER_ID); return filterImage; } @@ -299,14 +299,14 @@ public class SystemViewFilterAdapter extends AbstractSystemViewAdapter implement //SubSystem ss = (SubSystem)simpleFilter.getParent(); // return "filter created successfully" message object for this node - children[0] = new SystemMessageObject(SystemPlugin.getPluginMessage(MSG_EXPAND_FILTERCREATED), + children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_EXPAND_FILTERCREATED), ISystemMessageObject.MSGTYPE_OBJECTCREATED,filter); // select the new filter and expand it Viewer v = inputProvider.getViewer(); if ((v!=null) && (v instanceof ISystemResourceChangeListener)) { - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); SystemResourceChangeEvent event = new SystemResourceChangeEvent(newFilter, ISystemResourceChangeEvents.EVENT_SELECT_EXPAND, null); sr.postEvent((ISystemResourceChangeListener)v, event); // only expand in the current viewer, not all viewers! } @@ -317,7 +317,7 @@ public class SystemViewFilterAdapter extends AbstractSystemViewAdapter implement SystemBasePlugin.logError("Exception prompting for filter ",exc); } } - //SystemPlugin.logDebugMessage(this.getClass().getName(),"returning children"); + //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"returning children"); return children; } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterPoolAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterPoolAdapter.java index 7b417b972d2..d8c84fafd8d 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterPoolAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterPoolAdapter.java @@ -21,7 +21,6 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.action.IAction; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.core.subsystems.SubSystemHelpers; import org.eclipse.rse.core.subsystems.util.ISubsystemConfigurationAdapter; @@ -29,6 +28,7 @@ import org.eclipse.rse.filters.ISystemFilterPool; import org.eclipse.rse.filters.ISystemFilterPoolManager; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.validators.ISystemValidator; import org.eclipse.rse.ui.validators.ValidatorFilterPoolName; import org.eclipse.swt.widgets.Shell; @@ -87,7 +87,7 @@ public class SystemViewFilterPoolAdapter extends AbstractSystemViewAdapter imple */ public ImageDescriptor getImageDescriptor(Object element) { - //return SystemPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_FILTERPOOL_ID); + //return RSEUIPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_FILTERPOOL_ID); ImageDescriptor poolImage = null; ISystemFilterPool pool = (ISystemFilterPool)element; if (pool.getProvider() != null) @@ -97,7 +97,7 @@ public class SystemViewFilterPoolAdapter extends AbstractSystemViewAdapter imple poolImage = adapter.getSystemFilterPoolImage(pool); } if (poolImage == null) - poolImage = SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERPOOL_ID); + poolImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERPOOL_ID); return poolImage; } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterPoolReferenceAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterPoolReferenceAdapter.java index a58a8239ceb..986abbbe063 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterPoolReferenceAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterPoolReferenceAdapter.java @@ -21,7 +21,6 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.action.IAction; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.core.subsystems.SubSystemHelpers; @@ -31,6 +30,7 @@ import org.eclipse.rse.filters.ISystemFilterPoolManager; import org.eclipse.rse.filters.ISystemFilterPoolReference; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.validators.ISystemValidator; import org.eclipse.rse.ui.validators.ValidatorFilterPoolName; import org.eclipse.swt.widgets.Shell; @@ -124,7 +124,7 @@ public class SystemViewFilterPoolReferenceAdapter poolImage = adapter.getSystemFilterPoolImage(pool); } if (poolImage == null) - poolImage = SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERPOOL_ID); + poolImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERPOOL_ID); return poolImage; } @@ -144,7 +144,7 @@ public class SystemViewFilterPoolReferenceAdapter */ public String getText(Object element) { - boolean qualifyNames = SystemPlugin.getTheSystemRegistry().getQualifiedHostNames(); + boolean qualifyNames = RSEUIPlugin.getTheSystemRegistry().getQualifiedHostNames(); if (!qualifyNames) return getFilterPool(element).getName(); else diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterReferenceAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterReferenceAdapter.java index 529ba8e286b..1ea0cd99c41 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterReferenceAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterReferenceAdapter.java @@ -26,7 +26,6 @@ import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.Viewer; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemPreferencesManager; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; @@ -51,6 +50,7 @@ import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.validators.ISystemValidator; import org.eclipse.rse.ui.validators.ValidatorFilterName; import org.eclipse.swt.widgets.Shell; @@ -134,7 +134,7 @@ public class SystemViewFilterReferenceAdapter */ public ImageDescriptor getImageDescriptor(Object element) { - //return SystemPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_FILTER_ID); + //return RSEUIPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_FILTER_ID); ImageDescriptor filterImage = null; ISystemFilter filter = getFilter(element); if (filter.getProvider() != null) // getProvider() returns the subsystem factory @@ -144,7 +144,7 @@ public class SystemViewFilterReferenceAdapter filterImage = adapter.getSystemFilterImage(filter); } if (filterImage == null) - filterImage = SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTER_ID); + filterImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTER_ID); return filterImage; } @@ -266,18 +266,18 @@ public class SystemViewFilterReferenceAdapter ISystemFilter newFilter = adapter.createFilterByPrompting(ssf, fRef, getShell()); if (newFilter == null) { - children[0] = new SystemMessageObject(SystemPlugin.getPluginMessage(MSG_EXPAND_CANCELLED), ISystemMessageObject.MSGTYPE_CANCEL, element); + children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_EXPAND_CANCELLED), ISystemMessageObject.MSGTYPE_CANCEL, element); } else // filter successfully created! { // return "filter created successfully" message object for this node - children[0] = new SystemMessageObject(SystemPlugin.getPluginMessage(MSG_EXPAND_FILTERCREATED), ISystemMessageObject.MSGTYPE_OBJECTCREATED, element); + children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_EXPAND_FILTERCREATED), ISystemMessageObject.MSGTYPE_OBJECTCREATED, element); // select the new filter reference... ISystemFilterReference sfr = fRef.getParentSystemFilterReferencePool().getExistingSystemFilterReference(ss, newFilter); ISystemViewInputProvider inputProvider = getInput(); if ((sfr != null) && (inputProvider != null) && (inputProvider.getViewer() != null)) { - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); SystemResourceChangeEvent event = new SystemResourceChangeEvent(sfr, ISystemResourceChangeEvents.EVENT_SELECT_EXPAND, null); Viewer v = inputProvider.getViewer(); if (v instanceof ISystemResourceChangeListener) @@ -290,10 +290,10 @@ public class SystemViewFilterReferenceAdapter } catch (Exception exc) { - children[0] = new SystemMessageObject(SystemPlugin.getPluginMessage(MSG_EXPAND_FAILED), ISystemMessageObject.MSGTYPE_ERROR, element); + children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_EXPAND_FAILED), ISystemMessageObject.MSGTYPE_ERROR, element); SystemBasePlugin.logError("Exception prompting for filter ", exc); } - //SystemPlugin.logDebugMessage(this.getClass().getName(),"returning children"); + //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"returning children"); return children; } @@ -393,20 +393,20 @@ public class SystemViewFilterReferenceAdapter catch (InterruptedException exc) { children = new SystemMessageObject[1]; - children[0] = new SystemMessageObject(SystemPlugin.getPluginMessage(MSG_EXPAND_CANCELLED), ISystemMessageObject.MSGTYPE_CANCEL, element); + children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_EXPAND_CANCELLED), ISystemMessageObject.MSGTYPE_CANCEL, element); SystemBasePlugin.logDebugMessage(this.getClass().getName(), "Filter resolving canceled by user."); } catch (Exception exc) { children = new SystemMessageObject[1]; - children[0] = new SystemMessageObject(SystemPlugin.getPluginMessage(MSG_EXPAND_FAILED), ISystemMessageObject.MSGTYPE_ERROR, element); + children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_EXPAND_FAILED), ISystemMessageObject.MSGTYPE_ERROR, element); SystemBasePlugin.logError("Exception resolving filters' strings ", exc); } // message already issued if ((children == null) || (children.length == 0)) { children = new SystemMessageObject[1]; - children[0] = new SystemMessageObject(SystemPlugin.getPluginMessage(MSG_EXPAND_EMPTY), ISystemMessageObject.MSGTYPE_EMPTY, element); + children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(MSG_EXPAND_EMPTY), ISystemMessageObject.MSGTYPE_EMPTY, element); } return children; } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterStringAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterStringAdapter.java index 47bf8ef9919..64e6b28c52a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterStringAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewFilterStringAdapter.java @@ -20,7 +20,6 @@ import java.util.Vector; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.util.ISubsystemConfigurationAdapter; import org.eclipse.rse.filters.ISystemFilter; import org.eclipse.rse.filters.ISystemFilterPool; @@ -29,6 +28,7 @@ import org.eclipse.rse.filters.ISystemFilterString; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.views.properties.IPropertyDescriptor; @@ -94,7 +94,7 @@ public class SystemViewFilterStringAdapter extends AbstractSystemViewAdapter imp filterImage = adapter.getSystemFilterStringImage(filterString); } if (filterImage == null) - filterImage = SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERSTRING_ID); + filterImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERSTRING_ID); return filterImage; } @@ -171,7 +171,7 @@ public class SystemViewFilterStringAdapter extends AbstractSystemViewAdapter imp if (propertyDescriptorArray == null) { propertyDescriptorArray = new PropertyDescriptor[3]; - SystemPlugin plugin = SystemPlugin.getDefault(); + RSEUIPlugin plugin = RSEUIPlugin.getDefault(); int idx = 0; // parent filter pool propertyDescriptorArray[idx] = createSimplePropertyDescriptor(P_PARENT_FILTERPOOL,SystemViewResources.RESID_PROPERTY_FILTERPARENTPOOL_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPARENTPOOL_TOOLTIP); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewLabelAndContentProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewLabelAndContentProvider.java index 32135cfb845..f45e69bcd24 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewLabelAndContentProvider.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewLabelAndContentProvider.java @@ -35,11 +35,11 @@ import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.Viewer; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.model.ISystemResourceChangeListener; import org.eclipse.rse.model.SystemMessageObject; import org.eclipse.rse.ui.ISystemPreferencesConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.model.IWorkbenchAdapter; @@ -225,7 +225,7 @@ public class SystemViewLabelAndContentProvider extends LabelProvider protected boolean supportsDeferredQueries() { - IPreferenceStore store = SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore(); return store.getBoolean(ISystemPreferencesConstants.USE_DEFERRED_QUERIES); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewMessageAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewMessageAdapter.java index 366e0866610..225ed8785b2 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewMessageAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewMessageAdapter.java @@ -17,10 +17,10 @@ package org.eclipse.rse.ui.view; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.ISystemMessageObject; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.views.properties.IPropertyDescriptor; @@ -53,17 +53,17 @@ public class SystemViewMessageAdapter ISystemMessageObject msg = (ISystemMessageObject)element; int type = msg.getType(); if (type==ISystemMessageObject.MSGTYPE_ERROR) - return SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_ERROR_ID); + return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_ERROR_ID); else if (type==ISystemMessageObject.MSGTYPE_CANCEL) - return SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_INFO_TREE_ID); + return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_INFO_TREE_ID); // DY: icon vetoed by UCD - // return SystemPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_CANCEL_ID); + // return RSEUIPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_CANCEL_ID); else if (type==ISystemMessageObject.MSGTYPE_EMPTY) - return SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_EMPTY_ID); + return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_EMPTY_ID); else if (type==ISystemMessageObject.MSGTYPE_OBJECTCREATED) - return SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_OK_ID); + return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_OK_ID); else - return SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_INFO_TREE_ID); + return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_INFO_TREE_ID); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewNewConnectionPromptAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewNewConnectionPromptAdapter.java index b4aaeb96b35..e4fa0b699ce 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewNewConnectionPromptAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewNewConnectionPromptAdapter.java @@ -16,8 +16,8 @@ package org.eclipse.rse.ui.view; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemRunAction; import org.eclipse.swt.widgets.Shell; @@ -33,6 +33,6 @@ public class SystemViewNewConnectionPromptAdapter extends SystemViewPromptableAd */ protected SystemRunAction getRunAction(Shell shell) { return (new SystemRunAction(SystemResources.ACTION_NEWCONN_LABEL, SystemResources.ACTION_NEWCONN_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWCONNECTION_ID), shell)); + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWCONNECTION_ID), shell)); } } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPart.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPart.java index 5352665831c..673161c490c 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPart.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPart.java @@ -15,6 +15,7 @@ ********************************************************************************/ package org.eclipse.rse.ui.view; + import java.util.ArrayList; import java.util.Enumeration; import java.util.Hashtable; @@ -45,7 +46,6 @@ import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.Viewer; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.SystemElapsedTimer; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemPreferencesManager; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; @@ -63,6 +63,7 @@ import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemPreferencesConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.actions.SystemCascadingPreferencesAction; @@ -106,10 +107,8 @@ import org.eclipse.ui.part.ViewPart; import org.eclipse.ui.progress.UIJob; import org.eclipse.ui.views.framelist.FrameList; - /** * This is the desktop view wrapper of the System View viewer. - * ViewPart is from com.ibm.itp.ui.support.parts */ public class SystemViewPart extends ViewPart @@ -159,7 +158,7 @@ public class SystemViewPart protected SystemCopyToClipboardAction _copyAction; protected SystemPasteFromClipboardAction _pasteAction; - // Persistance tags. + // Persistence tags. static final String TAG_RELEASE = "release"; static final String TAG_SELECTION = "selection"; static final String TAG_EXPANDED_TO = "expandedTo"; @@ -185,7 +184,7 @@ public class SystemViewPart public SystemViewPart() { super(); - //SystemPlugin.logDebugMessage(this.getClass().getName(),"INSIDE CTOR FOR SYSTEMVIEWPART."); + //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"INSIDE CTOR FOR SYSTEMVIEWPART."); } /** * Easy access to the TreeViewer object @@ -275,7 +274,7 @@ public class SystemViewPart String path = properties.getRemoteFilePath(); if (subsystemId != null && path != null) { - ISubSystem subSystem = SystemPlugin.getTheSystemRegistry().getSubSystem(subsystemId); + ISubSystem subSystem = RSEUIPlugin.getTheSystemRegistry().getSubSystem(subsystemId); if (subSystem != null) { if (subSystem.isConnected()) @@ -356,7 +355,7 @@ public class SystemViewPart * public void setInputProvider(ISystemViewInputProvider input) { - SystemPlugin.logDebugMessage(this.getClass().getName(),"INSIDE SETINPUTPROVIDER FOR SYSTEMVIEWPART."); + RSEUIPlugin.logDebugMessage(this.getClass().getName(),"INSIDE SETINPUTPROVIDER FOR SYSTEMVIEWPART."); this.input = input; }*/ /** @@ -365,9 +364,9 @@ public class SystemViewPart */ public void createPartControl(Composite parent) { - //SystemPlugin.logInfo("INSIDE CREATEPARTCONTROL FOR SYSTEMVIEWPART."); + //RSEUIPlugin.logInfo("INSIDE CREATEPARTCONTROL FOR SYSTEMVIEWPART."); if (input == null) - //input = SystemPlugin.getTheSystemRegistry(); + //input = RSEUIPlugin.getTheSystemRegistry(); input = getInputProvider(); systemView = new SystemView(getShell(), parent, input, this); frameList = createFrameList(); @@ -387,7 +386,7 @@ public class SystemViewPart } // register global edit actions - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); Clipboard clipboard = registry.getSystemClipboard(); @@ -426,7 +425,7 @@ public class SystemViewPart // listen to editor events for linking getSite().getPage().addPartListener(partListener); - SystemWidgetHelpers.setHelp(parent, SystemPlugin.HELPPREFIX + "sysv0000"); + SystemWidgetHelpers.setHelp(parent, RSEUIPlugin.HELPPREFIX + "sysv0000"); // ---------------------- // Restore previous state @@ -440,7 +439,7 @@ public class SystemViewPart // if this is the primary RSE view, and there are no user-defined // connections, auto-expand the New Connection prompt... - if ((input == SystemPlugin.getTheSystemRegistry()) && (SystemPlugin.getTheSystemRegistry().getHosts().length == 1)) + if ((input == RSEUIPlugin.getTheSystemRegistry()) && (RSEUIPlugin.getTheSystemRegistry().getHosts().length == 1)) { // assume this is the primary RSE view @@ -504,7 +503,7 @@ public class SystemViewPart public void setFocus() { //System.out.println("INSIDE SETFOCUS FOR SYSTEMVIEWPART. SYSTEMVIEW NULL? " + (systemView==null)); - SystemPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell().setFocus(); + RSEUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell().setFocus(); systemView.getControl().setFocus(); /* the following was an attempt to fix problem with scrollbar needing two clicks to activate. didn't help. if (!SystemPreferencesGlobal.getGlobalSystemPreferences().getRememberState()) @@ -705,7 +704,7 @@ public class SystemViewPart super.dispose(); if (platformManager != null) unregisterWithManager(platformManager); - SystemPlugin.getTheSystemRegistry().removeSystemPreferenceChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().removeSystemPreferenceChangeListener(this); getSite().getPage().removePartListener(partListener); //System.out.println("INSIDE DISPOSE FOR SYSTEMVIEWPART."); } @@ -718,7 +717,7 @@ public class SystemViewPart { IAdaptable inputObj = getSite().getPage().getInput(); inputIsRoot = false; - ISystemViewInputProvider inputProvider = SystemPlugin.getTheSystemRegistry(); + ISystemViewInputProvider inputProvider = RSEUIPlugin.getTheSystemRegistry(); if (inputObj != null) { platformManager = Platform.getAdapterManager(); @@ -766,7 +765,7 @@ public class SystemViewPart { //msg = "INSIDE GETINPUTPROVIDER FOR SYSTEMVIEWPART: inputObj is null, inputProvider="+inputProvider; } - //SystemPlugin.logDebugMessage(this.getClass().getName(),msg); + //RSEUIPlugin.logDebugMessage(this.getClass().getName(),msg); //System.out.println("INSIDE getInputProvider. inputProvider = "+inputProvider); return inputProvider; } @@ -909,7 +908,7 @@ public class SystemViewPart */ protected ImageDescriptor getNavigatorImageDescriptor(String relativePath) { - return SystemPlugin.getDefault().getImageDescriptorFromIDE(relativePath); // more reusable + return RSEUIPlugin.getDefault().getImageDescriptorFromIDE(relativePath); // more reusable /* String iconPath = "icons/full/"; //$NON-NLS-1$ try @@ -1069,7 +1068,7 @@ public class SystemViewPart protected void restoreState(IMemento memento) { RestoreStateRunnable restoreAction = new RestoreStateRunnable(memento); - restoreAction.setRule(SystemPlugin.getTheSystemRegistry()); + restoreAction.setRule(RSEUIPlugin.getTheSystemRegistry()); restoreAction.schedule(); /* DKM - Moved to RestoreStateRunnable @@ -1243,7 +1242,7 @@ public class SystemViewPart */ protected Object getObjectFromMemento(boolean showFilterPools, boolean showFilterStrings, String memento) { - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); ISystemProfile profile = null; IHost conn = null; @@ -1605,7 +1604,7 @@ public class SystemViewPart // to restore system view from cache (if the subsystem supports this) List cacheSubSystemList = new ArrayList(); ISubSystem cacheSubSystem; - boolean restoreFromCache = SystemPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.RESTORE_STATE_FROM_CACHE); + boolean restoreFromCache = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.RESTORE_STATE_FROM_CACHE); // walk through list of expanded nodes, breaking into 2 lists: non-remote and remote for (int i = 0; i < elementMem.length; i++) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewScratchpadAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewScratchpadAdapter.java index 4bad6c18c67..66a70946185 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewScratchpadAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewScratchpadAdapter.java @@ -21,9 +21,9 @@ import java.util.List; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.internal.model.SystemScratchpad; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction; import org.eclipse.rse.ui.validators.ISystemValidator; import org.eclipse.swt.widgets.Shell; @@ -54,7 +54,7 @@ public class SystemViewScratchpadAdapter extends AbstractSystemViewAdapter imple { if (_pasteToScratchpadAction == null) { - _pasteToScratchpadAction = new SystemPasteFromClipboardAction(shell, SystemPlugin.getTheSystemRegistry().getSystemClipboard()); + _pasteToScratchpadAction = new SystemPasteFromClipboardAction(shell, RSEUIPlugin.getTheSystemRegistry().getSystemClipboard()); } menu.add(menuGroup, _pasteToScratchpadAction); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewSubSystemAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewSubSystemAdapter.java index f090fc9fa1b..c36cd2debd2 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewSubSystemAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewSubSystemAdapter.java @@ -22,13 +22,13 @@ import org.eclipse.jface.viewers.ICellEditorValidator; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.rse.core.ISystemUserIdConstants; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; 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.util.ISubsystemConfigurationAdapter; import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.validators.ISystemValidator; import org.eclipse.rse.ui.validators.ValidatorPortInput; @@ -79,7 +79,7 @@ public class SystemViewSubSystemAdapter extends AbstractSystemViewAdapter return; // does not make sense adding unique actions per multi-selection Object element = selection.getFirstElement(); ISubSystem ss = (ISubSystem)element; - ISubSystemConfiguration ssFactory = SystemPlugin.getDefault().getSystemRegistry().getSubSystemConfiguration(ss); + ISubSystemConfiguration ssFactory = RSEUIPlugin.getDefault().getSystemRegistry().getSubSystemConfiguration(ss); ISubsystemConfigurationAdapter adapter = (ISubsystemConfigurationAdapter)ssFactory.getAdapter(ISubsystemConfigurationAdapter.class); IAction[] actions = adapter.getSubSystemActions(ssFactory, ss,shell); @@ -101,7 +101,7 @@ public class SystemViewSubSystemAdapter extends AbstractSystemViewAdapter { //System.out.println("INSIDE GETIMAGEDESCRIPTOR FOR SUBSYSTEM VIEW ADAPTER: "+element); ISubSystem ss = (ISubSystem)element; - ISubSystemConfiguration ssFactory = SystemPlugin.getDefault().getSystemRegistry().getSubSystemConfiguration(ss); + ISubSystemConfiguration ssFactory = RSEUIPlugin.getDefault().getSystemRegistry().getSubSystemConfiguration(ss); if (ssFactory != null) { if (ss.isConnected()) @@ -159,7 +159,7 @@ public class SystemViewSubSystemAdapter extends AbstractSystemViewAdapter { //System.out.println("INSIDE GETPARENT FOR SUBSYSTEM VIEW ADAPTER: "+element); ISubSystem ss = (ISubSystem)element; - return SystemPlugin.getDefault().getSystemRegistry().getHost(ss.getSystemProfile(),ss.getHostAliasName()); + return RSEUIPlugin.getDefault().getSystemRegistry().getHost(ss.getSystemProfile(),ss.getHostAliasName()); } /** @@ -203,7 +203,7 @@ public class SystemViewSubSystemAdapter extends AbstractSystemViewAdapter // add our unique property descriptors... //idx = defaultProperties.length; assertion - SystemPlugin plugin = SystemPlugin.getDefault(); + RSEUIPlugin plugin = RSEUIPlugin.getDefault(); // user id //propertyDescriptorArray[idx] = new TextPropertyDescriptor(ISystemPropertyConstants.P_USERID, @@ -248,7 +248,7 @@ public class SystemViewSubSystemAdapter extends AbstractSystemViewAdapter if (portDescriptor == null) { SystemViewPlugin plugin = SystemViewPlugin.getDefault(); - SystemPlugin sp = SystemPlugin.getDefault(); + RSEUIPlugin sp = RSEUIPlugin.getDefault(); portDescriptor = new SystemInheritableTextPropertyDescriptor(ISystemPropertyConstants.P_PORT, SystemViewResources.RESID_PROPERTY_PORT_LABEL)); @@ -626,7 +626,7 @@ public class SystemViewSubSystemAdapter extends AbstractSystemViewAdapter { //System.out.println("INSIDE DODELETE FOR SUBSYSTEM VIEW ADAPTER: "+element); ISubSystem ss = (ISubSystem)element; - ISystemRegistry sr = SystemPlugin.getDefault().getSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); sr.deleteSubSystem(ss); return true; } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/ClearAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/ClearAction.java index a58cf969d1e..c8c9f535def 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/ClearAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/ClearAction.java @@ -15,8 +15,8 @@ ********************************************************************************/ package org.eclipse.rse.ui.view.monitor; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; @@ -27,7 +27,7 @@ public class ClearAction extends BrowseAction public ClearAction(SystemMonitorViewPart view) { super(view, SystemResources.ACTION_CLEAR_ALL_LABEL, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CLEAR_ALL_ID)); + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CLEAR_ALL_ID)); // TODO DKM - get help for this! diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/ClearSelectedAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/ClearSelectedAction.java index 015de1ec92d..a63128ae525 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/ClearSelectedAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/ClearSelectedAction.java @@ -16,8 +16,8 @@ package org.eclipse.rse.ui.view.monitor; import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; @@ -29,7 +29,7 @@ public class ClearSelectedAction extends BrowseAction public ClearSelectedAction(SystemMonitorViewPart view) { super(view, SystemResources.ACTION_CLEAR_SELECTED_LABEL, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CLEAR_SELECTED_ID)); + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CLEAR_SELECTED_ID)); // TODO DKM - get help for this! //PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.CLEAR_CONSOLE_ACTION); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/MonitorViewPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/MonitorViewPage.java index 99c241f075e..7085bb44865 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/MonitorViewPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/MonitorViewPage.java @@ -29,7 +29,6 @@ import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.ISystemContainer; import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemResourceChangeEvents; @@ -37,6 +36,7 @@ import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.ISystemThemeConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.actions.SystemCopyToClipboardAction; @@ -79,7 +79,7 @@ import org.eclipse.ui.texteditor.ITextEditorActionConstants; public class MonitorViewPage implements SelectionListener, ISystemThemeConstants, IPropertyChangeListener, ISelectionChangedListener, Listener, FocusListener { - private static SystemMessage _queryMessage = SystemPlugin.getPluginMessage(ISystemMessages.MSG_QUERY_PROGRESS); + private static SystemMessage _queryMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_QUERY_PROGRESS); class PollingThread extends Thread { @@ -166,7 +166,7 @@ FocusListener { public void run() { - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); registry.fireEvent(new SystemResourceChangeEvent(_inputObject, ISystemResourceChangeEvents.EVENT_REFRESH, _inputObject)); //getViewer().refresh(); } @@ -236,7 +236,7 @@ FocusListener - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); // global actions Clipboard clipboard = registry.getSystemClipboard(); @@ -414,7 +414,7 @@ FocusListener }); - SystemWidgetHelpers.setHelp(_viewer.getControl(), SystemPlugin.HELPPREFIX + "ucmd0000"); + SystemWidgetHelpers.setHelp(_viewer.getControl(), RSEUIPlugin.HELPPREFIX + "ucmd0000"); //TableLayout layout = new TableLayout(); //tree.setLayout(layout); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/SystemMonitorViewPart.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/SystemMonitorViewPart.java index eaf3cd3fff0..8fef5c25034 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/SystemMonitorViewPart.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/monitor/SystemMonitorViewPart.java @@ -29,7 +29,6 @@ import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.window.Window; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.ISystemContainer; import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemRemoteChangeEvent; @@ -40,6 +39,7 @@ import org.eclipse.rse.model.ISystemResourceChangeEvents; import org.eclipse.rse.model.ISystemResourceChangeListener; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemPropertyResources; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; @@ -150,7 +150,7 @@ public class SystemMonitorViewPart private void setHelp() { - setHelp(SystemPlugin.HELPPREFIX + "gnpt0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "gnpt0000"); } } @@ -249,7 +249,7 @@ class SubSetAction extends BrowseAction private void setHelp() { - setHelp(SystemPlugin.HELPPREFIX + "gnss0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "gnss0000"); } } @@ -278,8 +278,8 @@ class SubSetAction extends BrowseAction public RefreshAction() { super(SystemMonitorViewPart.this, SystemResources.ACTION_REFRESH_LABEL, - //SystemPlugin.getDefault().getImageDescriptor(ICON_SYSTEM_REFRESH_ID)); - SystemPlugin.getDefault().getImageDescriptorFromIDE(ISystemIconConstants.ICON_IDE_REFRESH_ID)); + //RSEUIPlugin.getDefault().getImageDescriptor(ICON_SYSTEM_REFRESH_ID)); + RSEUIPlugin.getDefault().getImageDescriptorFromIDE(ISystemIconConstants.ICON_IDE_REFRESH_ID)); setTitleToolTip(SystemResources.ACTION_REFRESH_TOOLTIP); } @@ -566,7 +566,7 @@ class SubSetAction extends BrowseAction private void setHelp() { - setHelp(SystemPlugin.HELPPREFIX + "gntc0000"); + setHelp(RSEUIPlugin.HELPPREFIX + "gntc0000"); } } @@ -574,7 +574,7 @@ class SubSetAction extends BrowseAction { super(SystemMonitorViewPart.this, SystemResources.ACTION_SELECTCOLUMNS_LABEL, null); setToolTipText(SystemResources.ACTION_SELECTCOLUMNS_TOOLTIP); - setImageDescriptor(SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTER_ID)); + setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTER_ID)); } public void checkEnabledState() @@ -663,9 +663,9 @@ class SubSetAction extends BrowseAction selectionService.addSelectionListener(this); - SystemWidgetHelpers.setHelp(_folder, SystemPlugin.HELPPREFIX + "ucmd0000"); + SystemWidgetHelpers.setHelp(_folder, RSEUIPlugin.HELPPREFIX + "ucmd0000"); - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); registry.addSystemResourceChangeListener(this); registry.addSystemRemoteChangeListener(this); @@ -687,7 +687,7 @@ class SubSetAction extends BrowseAction selectionService.removeSelectionListener(this); _folder.dispose(); - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); registry.removeSystemResourceChangeListener(this); super.dispose(); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/BrowseAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/BrowseAction.java index ff1614c1254..6dab5756b69 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/BrowseAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/BrowseAction.java @@ -17,8 +17,8 @@ package org.eclipse.rse.ui.view.scratchpad; import org.eclipse.jface.action.Action; import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.internal.model.SystemScratchpad; +import org.eclipse.rse.ui.RSEUIPlugin; @@ -32,7 +32,7 @@ class BrowseAction extends Action _view = view; setImageDescriptor(des); setToolTipText(label); - _scratchPad = SystemPlugin.getTheSystemRegistry().getSystemScratchPad(); + _scratchPad = RSEUIPlugin.getTheSystemRegistry().getSystemScratchPad(); } public void checkEnabledState() diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/ClearAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/ClearAction.java index 20c7ac42de9..35f9e44209f 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/ClearAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/ClearAction.java @@ -16,10 +16,10 @@ package org.eclipse.rse.ui.view.scratchpad; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.ISystemResourceChangeEvents; import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; @@ -30,7 +30,7 @@ public class ClearAction extends BrowseAction public ClearAction(SystemScratchpadView view) { super(view, SystemResources.ACTION_CLEAR_ALL_LABEL, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CLEAR_ALL_ID)); + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CLEAR_ALL_ID)); // TODO DKM - get help for this! @@ -51,7 +51,7 @@ public class ClearAction extends BrowseAction private void clear() { _scratchPad.clearChildren(); - SystemPlugin.getTheSystemRegistry().fireEvent(new SystemResourceChangeEvent(_scratchPad, ISystemResourceChangeEvents.EVENT_REFRESH, _scratchPad)); + RSEUIPlugin.getTheSystemRegistry().fireEvent(new SystemResourceChangeEvent(_scratchPad, ISystemResourceChangeEvents.EVENT_REFRESH, _scratchPad)); //_view.updateActionStates(); } } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/ClearSelectedAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/ClearSelectedAction.java index 11e3b17341d..311cfc53b4a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/ClearSelectedAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/ClearSelectedAction.java @@ -19,10 +19,10 @@ package org.eclipse.rse.ui.view.scratchpad; import java.util.Iterator; import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.ISystemResourceChangeEvents; import org.eclipse.rse.model.SystemResourceChangeEvent; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; @@ -33,7 +33,7 @@ public class ClearSelectedAction extends BrowseAction public ClearSelectedAction(SystemScratchpadView view) { super(view, SystemResources.ACTION_CLEAR_SELECTED_LABEL, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CLEAR_SELECTED_ID)); + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CLEAR_SELECTED_ID)); // TODO DKM - get help for this! //PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.CLEAR_CONSOLE_ACTION); @@ -79,7 +79,7 @@ public class ClearSelectedAction extends BrowseAction { _scratchPad.removeChild(iterator.next()); } - SystemPlugin.getTheSystemRegistry().fireEvent(new SystemResourceChangeEvent(_scratchPad, ISystemResourceChangeEvents.EVENT_REFRESH, _scratchPad)); + RSEUIPlugin.getTheSystemRegistry().fireEvent(new SystemResourceChangeEvent(_scratchPad, ISystemResourceChangeEvents.EVENT_REFRESH, _scratchPad)); //_view.updateActionStates(); } } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/SystemScratchpadView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/SystemScratchpadView.java index 03166dbf295..4070c4ff093 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/SystemScratchpadView.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/SystemScratchpadView.java @@ -43,7 +43,6 @@ import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.window.SameShellProvider; import org.eclipse.rse.core.SystemAdapterHelpers; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemPopupMenuActionContributorManager; import org.eclipse.rse.filters.ISystemFilter; import org.eclipse.rse.filters.ISystemFilterReference; @@ -62,6 +61,7 @@ import org.eclipse.rse.ui.ISystemDeleteTarget; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.ISystemRenameTarget; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.actions.ISystemAction; import org.eclipse.rse.ui.actions.SystemCommonDeleteAction; import org.eclipse.rse.ui.actions.SystemCommonRenameAction; @@ -185,7 +185,7 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec setContentProvider(_provider); - setLabelProvider(new DecoratingLabelProvider(_provider, SystemPlugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator())); + setLabelProvider(new DecoratingLabelProvider(_provider, RSEUIPlugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator())); //setLabelProvider(_provider); @@ -197,8 +197,8 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec addSelectionChangedListener(this); - SystemPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this); - SystemPlugin.getTheSystemRegistry().addSystemRemoteChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().addSystemRemoteChangeListener(this); initDragAndDrop(); @@ -387,7 +387,7 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec if (w != null) { remove(child); - SystemPlugin.getTheSystemRegistry().getSystemScratchPad().removeChild(child); + RSEUIPlugin.getTheSystemRegistry().getSystemScratchPad().removeChild(child); } } } @@ -627,8 +627,8 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec // remove listeners removeSelectionChangedListener(this); - SystemPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this); - SystemPlugin.getTheSystemRegistry().removeSystemRemoteChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().removeSystemRemoteChangeListener(this); Composite tree = getTree(); @@ -849,7 +849,7 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec */ public boolean doDelete(IProgressMonitor monitor) { - ISystemRegistry sr = SystemPlugin.getDefault().getSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); IStructuredSelection selection = (IStructuredSelection) getSelection(); Iterator elements = selection.iterator(); //int selectedCount = selection.size(); @@ -886,7 +886,7 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec String msg = exc.getMessage(); if ((msg == null) || (exc instanceof ClassCastException)) msg = exc.getClass().getName(); - SystemMessageDialog.displayErrorMessage(getShell(), SystemPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_DELETING).makeSubstitution(element, msg)); + SystemMessageDialog.displayErrorMessage(getShell(), RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_DELETING).makeSubstitution(element, msg)); ok = false; } if (anyOk) @@ -942,7 +942,7 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec */ public boolean doRename(String[] newNames) { - ISystemRegistry sr = SystemPlugin.getDefault().getSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); IStructuredSelection selection = (IStructuredSelection) getSelection(); Iterator elements = selection.iterator(); int selectedCount = selection.size(); @@ -987,7 +987,7 @@ implements IMenuListener, ISystemDeleteTarget, ISystemRenameTarget, ISystemSelec //String msg = exc.getMessage(); //if ((msg == null) || (exc instanceof ClassCastException)) // msg = exc.getClass().getName(); - SystemMessageDialog.displayErrorMessage(getShell(), SystemPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_RENAMING).makeSubstitution(element, exc), + SystemMessageDialog.displayErrorMessage(getShell(), RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_RENAMING).makeSubstitution(element, exc), //msg), exc); ok = false; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/SystemScratchpadViewPart.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/SystemScratchpadViewPart.java index 7617ff58e8a..608f127a288 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/SystemScratchpadViewPart.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/scratchpad/SystemScratchpadViewPart.java @@ -28,12 +28,12 @@ import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.Viewer; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemResourceChangeEvent; import org.eclipse.rse.model.ISystemResourceChangeEvents; import org.eclipse.rse.model.ISystemResourceChangeListener; import org.eclipse.rse.services.clientserver.messages.SystemMessage; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.actions.SystemCommonDeleteAction; import org.eclipse.rse.ui.actions.SystemCopyToClipboardAction; @@ -119,7 +119,7 @@ public class SystemScratchpadViewPart extends ViewPart implements ISelectionList fillLocalToolBar(); // register global edit actions - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); Clipboard clipboard = registry.getSystemClipboard(); CellEditorActionHandler editorActionHandler = new CellEditorActionHandler(getViewSite().getActionBars()); @@ -135,7 +135,7 @@ public class SystemScratchpadViewPart extends ViewPart implements ISelectionList registry.addSystemResourceChangeListener(this); - SystemWidgetHelpers.setHelp(_viewer.getControl(), SystemPlugin.HELPPREFIX + "scrp0000"); + SystemWidgetHelpers.setHelp(_viewer.getControl(), RSEUIPlugin.HELPPREFIX + "scrp0000"); setInput(registry.getSystemScratchPad()); @@ -152,7 +152,7 @@ public class SystemScratchpadViewPart extends ViewPart implements ISelectionList selectionService.removeSelectionListener(this); _viewer.removeSelectionChangedListener(this); - SystemPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this); if (_viewer != null) { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchClearHistoryAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchClearHistoryAction.java index ec9cd255002..44ccbb83f49 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchClearHistoryAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchClearHistoryAction.java @@ -16,8 +16,8 @@ package org.eclipse.rse.ui.view.search; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.swt.widgets.Shell; @@ -37,7 +37,7 @@ public class SystemSearchClearHistoryAction extends SystemBaseAction { */ public SystemSearchClearHistoryAction(SystemSearchViewPart searchView, Shell shell) { super(SystemResources.RESID_SEARCH_CLEAR_HISTORY_LABEL,SystemResources.RESID_SEARCH_CLEAR_HISTORY_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SEARCH_CLEAR_HISTORY_ID), shell); + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SEARCH_CLEAR_HISTORY_ID), shell); this.searchView = searchView; } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchRemoveAllMatchesAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchRemoveAllMatchesAction.java index 818e147290d..e86af27e50f 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchRemoveAllMatchesAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchRemoveAllMatchesAction.java @@ -16,8 +16,8 @@ package org.eclipse.rse.ui.view.search; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.swt.widgets.Shell; @@ -37,7 +37,7 @@ public class SystemSearchRemoveAllMatchesAction extends SystemBaseAction { */ public SystemSearchRemoveAllMatchesAction(SystemSearchViewPart searchView, Shell shell) { super(SystemResources.RESID_SEARCH_REMOVE_ALL_MATCHES_LABEL,SystemResources.RESID_SEARCH_REMOVE_ALL_MATCHES_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SEARCH_REMOVE_ALL_MATCHES_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SEARCH_REMOVE_ALL_MATCHES_ID), shell); this.searchView = searchView; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchRemoveSelectedMatchesAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchRemoveSelectedMatchesAction.java index bb9808446cc..8e27c08c669 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchRemoveSelectedMatchesAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchRemoveSelectedMatchesAction.java @@ -16,8 +16,8 @@ package org.eclipse.rse.ui.view.search; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.swt.widgets.Shell; @@ -37,7 +37,7 @@ public class SystemSearchRemoveSelectedMatchesAction extends SystemBaseAction { */ public SystemSearchRemoveSelectedMatchesAction(SystemSearchViewPart searchView, Shell shell) { super(SystemResources.RESID_SEARCH_REMOVE_SELECTED_MATCHES_LABEL,SystemResources.RESID_SEARCH_REMOVE_SELECTED_MATCHES_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SEARCH_REMOVE_SELECTED_MATCHES_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SEARCH_REMOVE_SELECTED_MATCHES_ID), shell); this.searchView = searchView; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchTableView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchTableView.java index b47f79ed371..3db583a611e 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchTableView.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchTableView.java @@ -18,7 +18,6 @@ package org.eclipse.rse.ui.view.search; import java.util.Vector; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.model.ISystemRemoteChangeEvent; import org.eclipse.rse.model.ISystemRemoteChangeEvents; @@ -26,6 +25,7 @@ import org.eclipse.rse.model.ISystemResourceChangeEvent; import org.eclipse.rse.model.ISystemResourceChangeEvents; import org.eclipse.rse.services.search.IHostSearchResultConfiguration; import org.eclipse.rse.services.search.IHostSearchResultSet; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.messages.ISystemMessageLine; import org.eclipse.rse.ui.view.ISystemViewElementAdapter; import org.eclipse.rse.ui.view.SystemDecoratingLabelProvider; @@ -48,7 +48,7 @@ public class SystemSearchTableView extends SystemTableTreeView super(tabletree, msgLine); this.resultSet = resultSet; - setLabelProvider(new SystemDecoratingLabelProvider(_provider, SystemPlugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator())); + setLabelProvider(new SystemDecoratingLabelProvider(_provider, RSEUIPlugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator())); } public IHostSearchResultSet getResultSet() { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchViewPart.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchViewPart.java index 7823e0b1c26..2fd3b2e1503 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchViewPart.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/search/SystemSearchViewPart.java @@ -40,7 +40,6 @@ import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.rse.core.SystemAdapterHelpers; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.ISystemResourceChangeEvent; import org.eclipse.rse.model.ISystemResourceChangeEvents; @@ -51,6 +50,7 @@ import org.eclipse.rse.services.search.IHostSearchResultSet; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction; @@ -156,7 +156,7 @@ public class SystemSearchViewPart extends ViewPart implements ISystemResourceCha public class CancelAction extends Action { public CancelAction() { - super(SystemResources.ACTION_CANCEL_SEARCH_LABEL, SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_STOP_ID)); + super(SystemResources.ACTION_CANCEL_SEARCH_LABEL, RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_STOP_ID)); setToolTipText(SystemResources.ACTION_CANCEL_SEARCH_TOOLTIP); } @@ -249,10 +249,10 @@ public class SystemSearchViewPart extends ViewPart implements ISystemResourceCha actionBars.updateActionBars(); // add view as a system listener - SystemPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().addSystemResourceChangeListener(this); // set help - SystemWidgetHelpers.setHelp(pageBook, SystemPlugin.HELPPREFIX + "srch0000"); + SystemWidgetHelpers.setHelp(pageBook, RSEUIPlugin.HELPPREFIX + "srch0000"); } private void initToolBarActions(IToolBarManager tbMgr) { @@ -307,7 +307,7 @@ public class SystemSearchViewPart extends ViewPart implements ISystemResourceCha tbMgr.add(removeAllAction); // register global edit actions - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); // clipboard Clipboard clipboard = registry.getSystemClipboard(); @@ -443,7 +443,7 @@ public class SystemSearchViewPart extends ViewPart implements ISystemResourceCha currentViewer.addDoubleClickListener(new SystemSearchDoubleClickListener()); // set help for control - SystemWidgetHelpers.setHelp(currentViewer.getControl(), SystemPlugin.HELPPREFIX + "srch0000"); + SystemWidgetHelpers.setHelp(currentViewer.getControl(), RSEUIPlugin.HELPPREFIX + "srch0000"); // add current viewer to viewer list viewers.add(currentViewer); @@ -457,7 +457,7 @@ public class SystemSearchViewPart extends ViewPart implements ISystemResourceCha int num = viewers.size()-1; // create history action - SystemSearchHistoryAction historyAction = new SystemSearchHistoryAction(title, SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SEARCH_RESULT_ID), this, num); + SystemSearchHistoryAction historyAction = new SystemSearchHistoryAction(title, RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SEARCH_RESULT_ID), this, num); // add to list of history actions historyActions.add(historyAction); @@ -550,7 +550,7 @@ public class SystemSearchViewPart extends ViewPart implements ISystemResourceCha public void dispose() { // remove as resource change listener - SystemPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this); // clear viewers clearViewers(); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamView.java index 27e7fcd7e44..17e454a4bbe 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamView.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamView.java @@ -23,10 +23,10 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TreeViewer; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.ISystemResourceChangeEvent; import org.eclipse.rse.model.ISystemResourceChangeEvents; import org.eclipse.rse.model.ISystemResourceChangeListener; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.view.ISystemSelectAllTarget; import org.eclipse.swt.widgets.Composite; @@ -53,7 +53,7 @@ public class SystemTeamView extends TreeViewer implements ISystemSelectAllTarget { super(parent); this.teamViewPart = teamViewPart; - SystemWidgetHelpers.setHelp(getTree(), SystemPlugin.HELPPREFIX+"teamview"); + SystemWidgetHelpers.setHelp(getTree(), RSEUIPlugin.HELPPREFIX+"teamview"); } /** @@ -64,7 +64,7 @@ public class SystemTeamView extends TreeViewer implements ISystemSelectAllTarget { super(parent, style); this.teamViewPart = teamViewPart; - SystemWidgetHelpers.setHelp(getTree(), SystemPlugin.HELPPREFIX+"teamview"); + SystemWidgetHelpers.setHelp(getTree(), RSEUIPlugin.HELPPREFIX+"teamview"); } /** @@ -74,7 +74,7 @@ public class SystemTeamView extends TreeViewer implements ISystemSelectAllTarget { super(tree); this.teamViewPart = teamViewPart; - SystemWidgetHelpers.setHelp(getTree(), SystemPlugin.HELPPREFIX+"teamview"); + SystemWidgetHelpers.setHelp(getTree(), RSEUIPlugin.HELPPREFIX+"teamview"); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewActiveProfileAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewActiveProfileAction.java index 8bf2bf13f7e..ddf12efb2e0 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewActiveProfileAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewActiveProfileAction.java @@ -16,13 +16,13 @@ package org.eclipse.rse.ui.view.team; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.internal.model.SystemProfileManager; import org.eclipse.rse.model.ISystemProfile; import org.eclipse.rse.model.ISystemProfileManager; import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.swt.widgets.Shell; @@ -45,11 +45,11 @@ public class SystemTeamViewActiveProfileAction extends SystemBaseAction public SystemTeamViewActiveProfileAction(Shell parent) { super(SystemResources.ACTION_PROFILE_ACTIVATE_LABEL,SystemResources.ACTION_PROFILE_ACTIVATE_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEACTIVE_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEACTIVE_ID), parent); allowOnMultipleSelection(true); // as requested by WSDD team setContextMenuGroup(ISystemContextMenuConstants.GROUP_CHANGE); - setHelp(SystemPlugin.HELPPREFIX+"actnactp"); + setHelp(RSEUIPlugin.HELPPREFIX+"actnactp"); setChecked(false); } @@ -76,7 +76,7 @@ public class SystemTeamViewActiveProfileAction extends SystemBaseAction */ public void run() { - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); ISystemProfile profile = (ISystemProfile)getFirstSelection(); boolean check = isChecked(); while (profile != null) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewCategoryAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewCategoryAdapter.java index 207af60734e..90a8619c645 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewCategoryAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewCategoryAdapter.java @@ -21,11 +21,11 @@ import java.util.Vector; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.rse.core.ISystemUserIdConstants; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.model.ISystemProfile; import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.view.AbstractSystemViewAdapter; import org.eclipse.rse.ui.view.ISystemViewElementAdapter; @@ -159,7 +159,7 @@ public class SystemTeamViewCategoryAdapter { SystemTeamViewSubSystemFactoryNode[] nodes = null; - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); ISubSystemConfiguration[] factories = sr.getSubSystemConfigurations(); if (factories != null) { @@ -215,7 +215,7 @@ public class SystemTeamViewCategoryAdapter { /* propertyDescriptorArray = new PropertyDescriptor[1]; - SystemPlugin plugin = SystemPlugin.getDefault(); + RSEUIPlugin plugin = RSEUIPlugin.getDefault(); int idx = 0; // status propertyDescriptorArray[idx] = new PropertyDescriptor(ISystemPropertyConstants.P_IS_ACTIVE, @@ -238,7 +238,7 @@ public class SystemTeamViewCategoryAdapter /* if (name.equals(P_IS_ACTIVE)) { - boolean active = SystemPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName()); + boolean active = RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName()); if (active) return SystemViewResources.RESID_PROPERTY_PROFILESTATUS_ACTIVE_LABEL); else diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewContentProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewContentProvider.java index 71cfeb86d9c..a47789c0e8b 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewContentProvider.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewContentProvider.java @@ -23,10 +23,10 @@ import org.eclipse.core.runtime.Platform; import org.eclipse.jface.viewers.IContentProvider; import org.eclipse.jface.viewers.Viewer; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemResourceManager; import org.eclipse.rse.model.ISystemProfile; import org.eclipse.rse.model.ISystemResourceChangeListener; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.view.ISystemViewElementAdapter; import org.eclipse.rse.ui.view.ISystemViewInputProvider; import org.eclipse.swt.widgets.Shell; @@ -57,7 +57,7 @@ public class SystemTeamViewContentProvider extends WorkbenchContentProvider if (element instanceof IProject) { //IProject rseProject = (IProject)element; - ISystemProfile[] profiles = SystemPlugin.getTheSystemRegistry().getAllSystemProfiles(); + ISystemProfile[] profiles = RSEUIPlugin.getTheSystemRegistry().getAllSystemProfiles(); children = profiles; //return profiles; } @@ -210,7 +210,7 @@ public class SystemTeamViewContentProvider extends WorkbenchContentProvider else adapter = (ISystemViewElementAdapter)((IAdaptable)o).getAdapter(ISystemViewElementAdapter.class); //if (adapter == null) - // SystemPlugin.logWarning("ADAPTER IS NULL FOR ELEMENT OF TYPE: " + o.getClass().getName()); + // RSEUIPlugin.logWarning("ADAPTER IS NULL FOR ELEMENT OF TYPE: " + o.getClass().getName()); if ((adapter!=null) && (viewer != null)) { Shell shell = null; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewLabelProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewLabelProvider.java index 57e27c3695e..fcd392973e5 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewLabelProvider.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewLabelProvider.java @@ -28,10 +28,10 @@ import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.Viewer; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.ISystemProfile; import org.eclipse.rse.model.ISystemResourceChangeListener; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.view.ISystemViewElementAdapter; import org.eclipse.rse.ui.view.ISystemViewInputProvider; import org.eclipse.swt.graphics.Image; @@ -75,10 +75,10 @@ public class SystemTeamViewLabelProvider extends LabelProvider if (element instanceof ISystemProfile) { ISystemProfile profile = (ISystemProfile)element; - if (SystemPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName())) - return SystemPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_PROFILE_ACTIVE_ID); + if (RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName())) + return RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_PROFILE_ACTIVE_ID); else - return SystemPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_PROFILE_ID); + return RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_PROFILE_ID); } // If we have a project, return the resource project images. @@ -188,7 +188,7 @@ public class SystemTeamViewLabelProvider extends LabelProvider else adapter = (ISystemViewElementAdapter)((IAdaptable)o).getAdapter(ISystemViewElementAdapter.class); //if (adapter == null) - // SystemPlugin.logWarning("ADAPTER IS NULL FOR ELEMENT OF TYPE: " + o.getClass().getName()); + // RSEUIPlugin.logWarning("ADAPTER IS NULL FOR ELEMENT OF TYPE: " + o.getClass().getName()); if ((adapter!=null) && (viewer != null)) { Shell shell = null; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewMakeActiveProfileAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewMakeActiveProfileAction.java index 004278ce8bb..6b558620743 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewMakeActiveProfileAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewMakeActiveProfileAction.java @@ -16,13 +16,13 @@ package org.eclipse.rse.ui.view.team; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.internal.model.SystemProfileManager; import org.eclipse.rse.model.ISystemProfile; import org.eclipse.rse.model.ISystemProfileManager; import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.swt.widgets.Shell; @@ -41,11 +41,11 @@ public class SystemTeamViewMakeActiveProfileAction extends SystemBaseAction public SystemTeamViewMakeActiveProfileAction(Shell parent) { super(SystemResources.ACTION_PROFILE_MAKEACTIVE_LABEL,SystemResources.ACTION_PROFILE_MAKEACTIVE_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEACTIVE_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEACTIVE_ID), parent); allowOnMultipleSelection(true); setContextMenuGroup(ISystemContextMenuConstants.GROUP_CHANGE); - setHelp(SystemPlugin.HELPPREFIX+"ActionMakeActive"); + setHelp(RSEUIPlugin.HELPPREFIX+"ActionMakeActive"); } /** @@ -80,7 +80,7 @@ public class SystemTeamViewMakeActiveProfileAction extends SystemBaseAction */ public void run() { - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); ISystemProfile profile = (ISystemProfile)getFirstSelection(); while (profile != null) { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewMakeInActiveProfileAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewMakeInActiveProfileAction.java index 163fb19b1ec..6aed45b9342 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewMakeInActiveProfileAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewMakeInActiveProfileAction.java @@ -16,13 +16,13 @@ package org.eclipse.rse.ui.view.team; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.internal.model.SystemProfileManager; import org.eclipse.rse.model.ISystemProfile; import org.eclipse.rse.model.ISystemProfileManager; import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.swt.widgets.Shell; @@ -41,11 +41,11 @@ public class SystemTeamViewMakeInActiveProfileAction extends SystemBaseAction public SystemTeamViewMakeInActiveProfileAction(Shell parent) { super(SystemResources.ACTION_PROFILE_MAKEINACTIVE_LABEL,SystemResources.ACTION_PROFILE_MAKEINACTIVE_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEINACTIVE_ID), + RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEINACTIVE_ID), parent); allowOnMultipleSelection(true); setContextMenuGroup(ISystemContextMenuConstants.GROUP_CHANGE); - setHelp(SystemPlugin.HELPPREFIX+"ActionMakeInactive"); + setHelp(RSEUIPlugin.HELPPREFIX+"ActionMakeInactive"); } /** @@ -82,7 +82,7 @@ public class SystemTeamViewMakeInActiveProfileAction extends SystemBaseAction { // TODO: test if attempting to disable all profiles, and issue an error // that at least one needs to be active. Or, at least a warning. - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); ISystemProfile profile = (ISystemProfile)getFirstSelection(); while (profile != null) { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewPart.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewPart.java index fc1b1a4e85e..7ce1ea6629e 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewPart.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewPart.java @@ -55,7 +55,6 @@ import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.window.SameShellProvider; import org.eclipse.rse.core.SystemAdapterHelpers; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemResourceManager; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.filters.ISystemFilter; @@ -74,6 +73,7 @@ import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemDeleteTarget; import org.eclipse.rse.ui.ISystemRenameTarget; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.ISystemAction; import org.eclipse.rse.ui.actions.SystemCollapseAllAction; @@ -147,7 +147,7 @@ public class SystemTeamViewPart protected SystemTeamViewRefreshAllAction toolBarRefreshAllAction, menuRefreshAllAction; protected SystemCollapseAllAction collapseAllAction; - protected ISystemViewElementAdapter profileAdapter = SystemPlugin.getDefault().getSystemViewAdapterFactory().getProfileAdapter(); + protected ISystemViewElementAdapter profileAdapter = RSEUIPlugin.getDefault().getSystemViewAdapterFactory().getProfileAdapter(); // remember-state variables... private IMemento fMemento; @@ -283,7 +283,7 @@ public class SystemTeamViewPart // update F1 help //PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IF1HelpContextID.NAV01); - SystemPlugin.getTheSystemRegistry().addSystemModelChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().addSystemModelChangeListener(this); treeViewer.setAutoExpandLevel(2); // dang, it doesn't work! @@ -490,6 +490,7 @@ public class SystemTeamViewPart { // Scrub unrelated menu items scrubOtherContributions(menu); + createStandardGroups(menu); if (selection.size() == 1) fillProjectContextMenu(ourMenu, selection); @@ -708,8 +709,8 @@ public class SystemTeamViewPart { deleteAction = new SystemCommonDeleteAction(getShell(),this); deleteAction.setViewer(getViewer()); - deleteAction.setHelp(SystemPlugin.HELPPREFIX+"actndlpr"); - deleteAction.setDialogHelp(SystemPlugin.HELPPREFIX+"ddltprfl"); + deleteAction.setHelp(RSEUIPlugin.HELPPREFIX+"actndlpr"); + deleteAction.setDialogHelp(RSEUIPlugin.HELPPREFIX+"ddltprfl"); deleteAction.setPromptLabel(SystemResources.RESID_DELETE_PROFILES_PROMPT); } deleteAction.setSelection(selection); @@ -752,7 +753,7 @@ public class SystemTeamViewPart public void dispose() { - SystemPlugin.getTheSystemRegistry().removeSystemModelChangeListener(this); + RSEUIPlugin.getTheSystemRegistry().removeSystemModelChangeListener(this); super.dispose(); } @@ -1007,7 +1008,7 @@ public class SystemTeamViewPart boolean ok = true; IStructuredSelection selection= (IStructuredSelection)getStructuredSelection(); Iterator elements= selection.iterator(); - ISystemProfileManager mgr = SystemPlugin.getTheSystemRegistry().getSystemProfileManager(); + ISystemProfileManager mgr = RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager(); int nbrActiveProfiles = mgr.getActiveSystemProfiles().length; int activeCount = 0; while (ok && elements.hasNext()) @@ -1374,7 +1375,7 @@ public class SystemTeamViewPart if (memento == null) return null; - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); ISystemProfile profile = null; IProject project = null; SystemTeamViewCategoryNode category = null; @@ -1404,7 +1405,7 @@ public class SystemTeamViewPart profile = sr.getSystemProfile(token); break; case 3: - SystemTeamViewProfileAdapter profileAdapter = SystemPlugin.getDefault().getSystemViewAdapterFactory().getProfileAdapter(); + SystemTeamViewProfileAdapter profileAdapter = RSEUIPlugin.getDefault().getSystemViewAdapterFactory().getProfileAdapter(); category = profileAdapter.restoreCategory(profile, token); //System.out.println("Restored category: "+(category==null?"null":category.getLabel())); break; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewProfileAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewProfileAdapter.java index 4e5d91ef8bf..02396aa4410 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewProfileAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewProfileAdapter.java @@ -21,13 +21,13 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.rse.core.ISystemUserIdConstants; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemResourceManager; import org.eclipse.rse.model.ISystemProfile; import org.eclipse.rse.model.SystemStartHere; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.SystemMenuManager; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemCommonDeleteAction; import org.eclipse.rse.ui.actions.SystemCommonRenameAction; @@ -113,14 +113,14 @@ public class SystemTeamViewProfileAdapter copyProfileAction = new SystemProfileNameCopyAction(getShell()); deleteAction = new SystemCommonDeleteAction(getShell(),getTeamViewPart()); - deleteAction.setHelp(SystemPlugin.HELPPREFIX+"actndlpr"); - deleteAction.setDialogHelp(SystemPlugin.HELPPREFIX+"ddltprfl"); + deleteAction.setHelp(RSEUIPlugin.HELPPREFIX+"actndlpr"); + deleteAction.setDialogHelp(RSEUIPlugin.HELPPREFIX+"ddltprfl"); deleteAction.setPromptLabel(SystemResources.RESID_DELETE_PROFILES_PROMPT); renameAction = new SystemCommonRenameAction(getShell(),getTeamViewPart()); - renameAction.setHelp(SystemPlugin.HELPPREFIX+"actnrnpr"); - renameAction.setDialogSingleSelectionHelp(SystemPlugin.HELPPREFIX+"drnsprfl"); - renameAction.setDialogMultiSelectionHelp(SystemPlugin.HELPPREFIX+"drnmprfl"); + renameAction.setHelp(RSEUIPlugin.HELPPREFIX+"actnrnpr"); + renameAction.setDialogSingleSelectionHelp(RSEUIPlugin.HELPPREFIX+"drnsprfl"); + renameAction.setDialogMultiSelectionHelp(RSEUIPlugin.HELPPREFIX+"drnmprfl"); renameAction.setSingleSelectPromptLabel(SystemResources.RESID_SIMPLE_RENAME_PROFILE_PROMPT_LABEL, SystemResources.RESID_SIMPLE_RENAME_PROFILE_PROMPT_TIP); renameAction.setMultiSelectVerbage(SystemResources.RESID_MULTI_RENAME_PROFILE_VERBAGE); @@ -135,10 +135,10 @@ public class SystemTeamViewProfileAdapter public ImageDescriptor getImageDescriptor(Object element) { ISystemProfile profile = (ISystemProfile)element; - if (SystemPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName())) - return SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROFILE_ACTIVE_ID); + if (RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName())) + return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROFILE_ACTIVE_ID); else - return SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROFILE_ID); + return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROFILE_ID); } /** * Return the team view part @@ -192,7 +192,7 @@ public class SystemTeamViewProfileAdapter public String getStatusLineText(Object element) { ISystemProfile profile = (ISystemProfile)element; - boolean active = SystemPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName()); + boolean active = RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName()); return getType(element) + ": " + profile.getName() + ", " + SystemViewResources.RESID_PROPERTY_PROFILESTATUS_LABEL + ": " + (active ? SystemViewResources.RESID_PROPERTY_PROFILESTATUS_ACTIVE_LABEL : SystemViewResources.RESID_PROPERTY_PROFILESTATUS_NOTACTIVE_LABEL); @@ -229,28 +229,28 @@ public class SystemTeamViewProfileAdapter children[idx] = new SystemTeamViewCategoryNode(profile); children[0].setLabel(SystemResources.RESID_TEAMVIEW_CATEGORY_CONNECTIONS_LABEL); children[0].setDescription(SystemResources.RESID_TEAMVIEW_CATEGORY_CONNECTIONS_TOOLTIP); - children[0].setImageDescriptor(SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CONNECTION_ID)); + children[0].setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CONNECTION_ID)); children[0].setMementoHandle(SystemTeamViewCategoryNode.MEMENTO_CONNECTIONS); children[1].setLabel(SystemResources.RESID_TEAMVIEW_CATEGORY_FILTERPOOLS_LABEL); children[1].setDescription(SystemResources.RESID_TEAMVIEW_CATEGORY_FILTERPOOLS_TOOLTIP); - children[1].setImageDescriptor(SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERPOOL_ID)); + children[1].setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERPOOL_ID)); children[1].setMementoHandle(SystemTeamViewCategoryNode.MEMENTO_FILTERPOOLS); children[2].setLabel(SystemResources.RESID_TEAMVIEW_CATEGORY_USERACTIONS_LABEL); children[2].setDescription(SystemResources.RESID_TEAMVIEW_CATEGORY_USERACTIONS_TOOLTIP); - children[2].setImageDescriptor(SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_USERACTION_USR_ID)); + children[2].setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_USERACTION_USR_ID)); children[2].setMementoHandle(SystemTeamViewCategoryNode.MEMENTO_USERACTIONS); children[3].setLabel(SystemResources.RESID_TEAMVIEW_CATEGORY_COMPILECMDS_LABEL); children[3].setDescription(SystemResources.RESID_TEAMVIEW_CATEGORY_COMPILECMDS_TOOLTIP); - children[3].setImageDescriptor(SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_COMPILE_ID)); + children[3].setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_COMPILE_ID)); children[3].setMementoHandle(SystemTeamViewCategoryNode.MEMENTO_COMPILECMDS); /* children[4].setLabel(SystemResources.RESID_TEAMVIEW_CATEGORY_TARGETS_LABEL); children[4].setDescription(SystemResources.RESID_TEAMVIEW_CATEGORY_TARGETS_TOOLTIP); - children[4].setImageDescriptor(SystemPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_TARGET_ID)); + children[4].setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_TARGET_ID)); children[4].setMementoHandle(SystemTeamViewCategoryNode.MEMENTO_TARGETS); */ @@ -291,7 +291,7 @@ public class SystemTeamViewProfileAdapter if (propertyDescriptorArray == null) { propertyDescriptorArray = new PropertyDescriptor[1]; - SystemPlugin plugin = SystemPlugin.getDefault(); + RSEUIPlugin plugin = RSEUIPlugin.getDefault(); int idx = 0; // status propertyDescriptorArray[idx++] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_IS_ACTIVE,SystemViewResources.RESID_PROPERTY_PROFILESTATUS_LABEL, SystemViewResources.RESID_PROPERTY_PROFILESTATUS_TOOLTIP); @@ -312,7 +312,7 @@ public class SystemTeamViewProfileAdapter if (name.equals(P_IS_ACTIVE)) { - boolean active = SystemPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName()); + boolean active = RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName()); if (active) return SystemViewResources.RESID_PROPERTY_PROFILESTATUS_ACTIVE_LABEL; else @@ -344,7 +344,7 @@ public class SystemTeamViewProfileAdapter public boolean doDelete(Shell shell, Object element, IProgressMonitor monitor) throws Exception { boolean ok = true; - SystemPlugin.getTheSystemRegistry().deleteSystemProfile((ISystemProfile)element); + RSEUIPlugin.getTheSystemRegistry().deleteSystemProfile((ISystemProfile)element); return ok; } @@ -366,7 +366,7 @@ public class SystemTeamViewProfileAdapter public boolean doRename(Shell shell, Object element, String newName) throws Exception { boolean ok = true; - SystemPlugin.getTheSystemRegistry().renameSystemProfile((ISystemProfile)element, newName); + RSEUIPlugin.getTheSystemRegistry().renameSystemProfile((ISystemProfile)element, newName); return ok; } /** @@ -374,7 +374,7 @@ public class SystemTeamViewProfileAdapter */ public ISystemValidator getNameValidator(Object element) { - return new ValidatorProfileName(SystemPlugin.getTheSystemRegistry().getSystemProfileManager().getSystemProfileNamesVector()); + return new ValidatorProfileName(RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager().getSystemProfileNamesVector()); } /** * Parent override. diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewRefreshAllAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewRefreshAllAction.java index a8f0704545e..4cdc67a2513 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewRefreshAllAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewRefreshAllAction.java @@ -17,10 +17,10 @@ package org.eclipse.rse.ui.view.team; import org.eclipse.core.resources.IResource; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemResourceManager; import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.swt.widgets.Shell; @@ -40,14 +40,14 @@ public class SystemTeamViewRefreshAllAction extends SystemBaseAction public SystemTeamViewRefreshAllAction(Shell parent, SystemTeamViewPart teamView) { super(SystemResources.ACTION_REFRESH_ALL_LABEL,SystemResources.ACTION_REFRESH_ALL_TOOLTIP, - SystemPlugin.getDefault().getImageDescriptorFromIDE(ISystemIconConstants.ICON_IDE_REFRESH_ID), + RSEUIPlugin.getDefault().getImageDescriptorFromIDE(ISystemIconConstants.ICON_IDE_REFRESH_ID), parent); this.teamView = teamView; allowOnMultipleSelection(true); setContextMenuGroup(ISystemContextMenuConstants.GROUP_BUILD); setSelectionSensitive(false); - setHelp(SystemPlugin.HELPPREFIX+"actn0009"); + setHelp(RSEUIPlugin.HELPPREFIX+"actn0009"); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewSubSystemFactoryAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewSubSystemFactoryAdapter.java index 4bc875d8305..3386fc1078d 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewSubSystemFactoryAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/team/SystemTeamViewSubSystemFactoryAdapter.java @@ -251,7 +251,7 @@ public class SystemTeamViewSubSystemFactoryAdapter { /* propertyDescriptorArray = new PropertyDescriptor[1]; - SystemPlugin plugin = SystemPlugin.getDefault(); + RSEUIPlugin plugin = RSEUIPlugin.getDefault(); int idx = 0; // status propertyDescriptorArray[idx] = new PropertyDescriptor(ISystemPropertyConstants.P_IS_ACTIVE, @@ -274,7 +274,7 @@ public class SystemTeamViewSubSystemFactoryAdapter /* if (name.equals(P_IS_ACTIVE)) { - boolean active = SystemPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName()); + boolean active = RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName()); if (active) return SystemViewResources.RESID_PROPERTY_PROFILESTATUS_ACTIVE_LABEL); else diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/EnvironmentVariablesForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/EnvironmentVariablesForm.java index a34d933a61f..4bf0c1177b6 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/EnvironmentVariablesForm.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/EnvironmentVariablesForm.java @@ -31,11 +31,11 @@ import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.TextCellEditor; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.window.Window; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.SystemBaseForm; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.dialogs.EnvironmentVariablesPromptDialog; @@ -328,7 +328,7 @@ public class EnvironmentVariablesForm extends SystemBaseForm implements Selectio moveDownButton.addSelectionListener(this); moveDownButton.setEnabled(false); - SystemWidgetHelpers.setCompositeHelp(parent, SystemPlugin.HELPPREFIX + "envv0000"); + SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "envv0000"); return parent; } @@ -565,7 +565,7 @@ public class EnvironmentVariablesForm extends SystemBaseForm implements Selectio String name = (String) value; if (name == null || name.trim().equals("")) { - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_NONAME); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_NONAME); } else { @@ -583,7 +583,7 @@ public class EnvironmentVariablesForm extends SystemBaseForm implements Selectio { if (name.indexOf(invalidNameChars.charAt(i)) != -1) { - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_INVALIDCHAR); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_INVALIDCHAR); } } } @@ -596,7 +596,7 @@ public class EnvironmentVariablesForm extends SystemBaseForm implements Selectio existingName = ((EnvironmentVariable) envVars.get(i)).getName(); if (currentSelection != i && existingName.equals(name)) { - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_DUPLICATE); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_DUPLICATE); msg.makeSubstitution(existingName); } } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/IBMBaseServerLauncherForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/IBMBaseServerLauncherForm.java index e5f494b8077..c5f402ed89d 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/IBMBaseServerLauncherForm.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/IBMBaseServerLauncherForm.java @@ -16,11 +16,11 @@ package org.eclipse.rse.ui.widgets; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.internal.subsystems.IBMServerLauncherConstants; import org.eclipse.rse.core.subsystems.IServerLauncherProperties; import org.eclipse.rse.core.subsystems.ServerLaunchType; import org.eclipse.rse.ui.SystemBaseForm; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.messages.ISystemMessageLine; @@ -68,7 +68,7 @@ public abstract class IBMBaseServerLauncherForm extends SystemBaseForm implement createLauncherControls(group); // help - SystemWidgetHelpers.setCompositeHelp(parent, SystemPlugin.HELPPREFIX + "srln0000"); + SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "srln0000"); // initialization initDefaults(); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/IBMServerLauncherForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/IBMServerLauncherForm.java index 43299984614..3e0dbac216d 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/IBMServerLauncherForm.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/IBMServerLauncherForm.java @@ -16,12 +16,12 @@ package org.eclipse.rse.ui.widgets; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.IIBMServerLauncher; import org.eclipse.rse.core.subsystems.IServerLauncherProperties; import org.eclipse.rse.core.subsystems.ServerLaunchType; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.messages.ISystemMessageLine; @@ -45,14 +45,14 @@ import org.eclipse.swt.widgets.Text; public class IBMServerLauncherForm extends IBMBaseServerLauncherForm { - private Button _radioDaemon, _radioRexec, _radioNone; + private Button _radioDaemon, _radioRexec, _radioNone, _checkBoxSSL; private Text _fieldDaemonPort; private Label _labelDaemonPort; private Text _fieldRexecPath, _fieldRexecInvocation, _fieldRexecPort; private Label _labelRexecPath, _labelRexecInvocation, _labelRexecPort; - private Composite _daemonControls, _rexecControls; + private Composite _daemonControls, _rexecControls, _noneControls; private ValidatorServerPortInput _serverPortValidator; private ValidatorPortInput _daemonPortValidator; @@ -64,6 +64,7 @@ public class IBMServerLauncherForm extends IBMBaseServerLauncherForm private String _origInvocation; private int _origRexecPort; private int _origDaemonPort; + private boolean _origUseSSL; /** * Constructor for EnvironmentVariablesForm. @@ -83,7 +84,8 @@ public class IBMServerLauncherForm extends IBMBaseServerLauncherForm !_origPath.equals(getServerInstallPath()) || !_origInvocation.equals(getServerInvocation()) || _origRexecPort != getREXECPortAsInt() || - _origDaemonPort != getDaemonPortAsInt(); + _origDaemonPort != getDaemonPortAsInt() || + _origUseSSL != getUseSSL(); return isDirty; } @@ -96,6 +98,7 @@ public class IBMServerLauncherForm extends IBMBaseServerLauncherForm _fieldRexecPath.setEnabled(false); _fieldRexecPort.setEnabled(false); _fieldDaemonPort.setEnabled(false); + _checkBoxSSL.setEnabled(false); } @@ -191,13 +194,21 @@ public class IBMServerLauncherForm extends IBMBaseServerLauncherForm this); _radioNone.setToolTipText( SystemResources.RESID_PROP_SERVERLAUNCHER_RADIO_NONE_TOOLTIP); + _noneControls = SystemWidgetHelpers.createComposite(group, 1); + GridLayout nlayout = new GridLayout(); + GridData ndata = new GridData(GridData.FILL_HORIZONTAL); + ndata.horizontalIndent = 20; + _checkBoxSSL = SystemWidgetHelpers.createCheckBox(_noneControls, SystemResources.RESID_SUBSYSTEM_SSL_LABEL, this); + _checkBoxSSL.setToolTipText(SystemResources.RESID_SUBSYSTEM_SSL_TIP); + _noneControls.setLayout(nlayout); + _noneControls.setLayoutData(ndata); // help - SystemWidgetHelpers.setHelp(_radioDaemon, SystemPlugin.HELPPREFIX + "srln0001"); - SystemWidgetHelpers.setHelp(_radioRexec, SystemPlugin.HELPPREFIX + "srln0002"); - SystemWidgetHelpers.setHelp(_radioNone, SystemPlugin.HELPPREFIX + "srln0003"); - SystemWidgetHelpers.setHelp(_fieldRexecPath, SystemPlugin.HELPPREFIX + "srln0004"); - SystemWidgetHelpers.setHelp(_fieldRexecInvocation, SystemPlugin.HELPPREFIX + "srln0005"); + SystemWidgetHelpers.setHelp(_radioDaemon, RSEUIPlugin.HELPPREFIX + "srln0001"); + SystemWidgetHelpers.setHelp(_radioRexec, RSEUIPlugin.HELPPREFIX + "srln0002"); + SystemWidgetHelpers.setHelp(_radioNone, RSEUIPlugin.HELPPREFIX + "srln0003"); + SystemWidgetHelpers.setHelp(_fieldRexecPath, RSEUIPlugin.HELPPREFIX + "srln0004"); + SystemWidgetHelpers.setHelp(_fieldRexecInvocation, RSEUIPlugin.HELPPREFIX + "srln0005"); } protected void initDefaults() @@ -210,6 +221,7 @@ public class IBMServerLauncherForm extends IBMBaseServerLauncherForm _labelRexecInvocation.setEnabled(_radioRexec.getSelection()); _labelRexecPort.setEnabled(_radioRexec.getSelection()); _fieldRexecPort.setEnabled(_radioRexec.getSelection()); + _checkBoxSSL.setEnabled(_radioNone.getSelection()); _fieldDaemonPort.setText(String.valueOf(DEFAULT_DAEMON_PORT)); _fieldRexecPath.setText(DEFAULT_REXEC_PATH); @@ -229,6 +241,7 @@ public class IBMServerLauncherForm extends IBMBaseServerLauncherForm String invocation = isl.getServerScript(); int rexecport = isl.getRexecPort(); // changed from getPortAsInt via d54335 int daemonPort = isl.getDaemonPort(); // defect 54335 + boolean useSSL = isl.getConnectorService().isUsingSSL(); // find out if daemon can be launched boolean allowDaemon = isl.isEnabledServerLaunchType(ServerLaunchType.DAEMON_LITERAL); @@ -250,6 +263,7 @@ public class IBMServerLauncherForm extends IBMBaseServerLauncherForm setServerInstallPath(path); setServerInvocation(invocation); setREXECPort(rexecport); + setUseSSL(useSSL); if (!allowDaemon && !allowRexec && !allowNo) { disable(); @@ -261,6 +275,7 @@ public class IBMServerLauncherForm extends IBMBaseServerLauncherForm _origInvocation = getServerInvocation(); _origRexecPort = getREXECPortAsInt(); _origDaemonPort = getDaemonPortAsInt(); + _origUseSSL = getUseSSL(); } /** @@ -282,7 +297,7 @@ public class IBMServerLauncherForm extends IBMBaseServerLauncherForm if (path == null || path.length() == 0) { - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_BLANKFIELD); } if (msg != null) @@ -332,15 +347,23 @@ public class IBMServerLauncherForm extends IBMBaseServerLauncherForm String invocation = getServerInvocation(); int rexecPort = getREXECPortAsInt(); int daemonPort = getDaemonPortAsInt(); - + boolean useSSL = getUseSSL(); IIBMServerLauncher isl = (IIBMServerLauncher)launcher; isl.setServerLaunchType(launchType); isl.setServerPath(path); isl.setServerScript(invocation); isl.setRexecPort(rexecPort); // changed from setPort via d54335. Phil - isl.setDaemonPort(daemonPort); - + isl.setDaemonPort(daemonPort); + isl.getConnectorService().setIsUsingSSL(useSSL); + try + { + isl.getConnectorService().commit(); + } + catch (Exception e) + { + return false; + } return true; } @@ -356,6 +379,7 @@ public class IBMServerLauncherForm extends IBMBaseServerLauncherForm _labelRexecInvocation.setEnabled(useRexec); _fieldRexecPort.setEnabled(useRexec); _labelRexecPort.setEnabled(useRexec); + _checkBoxSSL.setEnabled(_radioNone.getSelection()); verify(); } @@ -371,6 +395,16 @@ public class IBMServerLauncherForm extends IBMBaseServerLauncherForm else return null; } + + protected boolean getUseSSL() + { + return _checkBoxSSL.getSelection(); + } + + protected void setUseSSL(boolean use) + { + _checkBoxSSL.setSelection(use); + } protected void setLaunchType(ServerLaunchType type) { @@ -525,6 +559,7 @@ public class IBMServerLauncherForm extends IBMBaseServerLauncherForm public void setNoLaunchEnabled(boolean enable) { _radioNone.setEnabled(enable); + _checkBoxSSL.setEnabled(enable); } /** * Return the current value of the REXEC server install path widget diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritControl.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritControl.java index f7e4c3e8acd..c2f4288ede6 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritControl.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritControl.java @@ -15,7 +15,7 @@ ********************************************************************************/ package org.eclipse.rse.ui.widgets; -import org.eclipse.rse.core.SystemPlugin; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.SWT; import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; @@ -57,7 +57,7 @@ public class InheritControl setLayout(new InheritControlLayout()); //Class c = InheritControl.class; //String imagePath = "icons" + java.io.File.separatorChar; - SystemPlugin sp = SystemPlugin.getDefault(); + RSEUIPlugin sp = RSEUIPlugin.getDefault(); try { //ImageData source = new ImageData(c.getResourceAsStream (imagePath+"local.gif")); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SSLForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SSLForm.java index e07f267dbfa..59485a79ef9 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SSLForm.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SSLForm.java @@ -34,6 +34,7 @@ public class SSLForm extends SystemBaseForm { private Button _sslCheckBox; + private Button _nonsslCheckBox; /** * Constructor for SSLForm. @@ -47,28 +48,50 @@ public class SSLForm extends SystemBaseForm { * Determines whether ssl is checked or not * @return */ - public boolean isChecked() + public boolean isSSLAlertChecked() + { return _sslCheckBox.getSelection(); } + /** + * Check/uncheck the ssl checkbox + * @param flag + */ + public void setSSLALertIsChecked(boolean flag) + + { + _sslCheckBox.setSelection(flag); + } + + /** + * Determines whether non-ssl is checked or not + * @return + */ + public boolean isNonSSLAlertChecked() + { + return _nonsslCheckBox.getSelection(); + } + /** * Check/uncheck the ssl checkbox * @param flag */ - public void setIsChecked(boolean flag) + public void setNonSSLALertIsChecked(boolean flag) { - _sslCheckBox.setSelection(flag); + _nonsslCheckBox.setSelection(flag); } /** * Enable/disable the ssl checkbox * @param flag */ - public void enableCheckBox(boolean flag) + public void enableCheckBoxes(boolean flag) + { _sslCheckBox.setEnabled(flag); + _nonsslCheckBox.setEnabled(flag); } /** @@ -77,11 +100,11 @@ public class SSLForm extends SystemBaseForm { public Control createContents(Composite parent) { super.setShell(parent.getShell()); - _sslCheckBox = SystemWidgetHelpers.createCheckBox(parent, SystemResources.RESID_SUBSYSTEM_SSL_LABEL, this); - _sslCheckBox.setToolTipText(SystemResources.RESID_SUBSYSTEM_SSL_TIP); - - - return _sslCheckBox; + _sslCheckBox = SystemWidgetHelpers.createCheckBox(parent, SystemResources.RESID_SUBSYSTEM_SSL_ALERT_LABEL, this); + _sslCheckBox.setToolTipText(SystemResources.RESID_SUBSYSTEM_SSL_ALERT_TIP); + _nonsslCheckBox = SystemWidgetHelpers.createCheckBox(parent, SystemResources.RESID_SUBSYSTEM_NONSSL_ALERT_LABEL, this); + _nonsslCheckBox.setToolTipText(SystemResources.RESID_SUBSYSTEM_NONSSL_ALERT_TIP); + return parent; } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ServerConnectionSecurityForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ServerConnectionSecurityForm.java index 6f679d3a7e0..8c12fc165d4 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ServerConnectionSecurityForm.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/ServerConnectionSecurityForm.java @@ -42,12 +42,12 @@ public class ServerConnectionSecurityForm extends SystemBaseForm public void disable() { - _sslForm.enableCheckBox(false); + _sslForm.enableCheckBoxes(false); } public void enable() { - _sslForm.enableCheckBox(true); + _sslForm.enableCheckBoxes(true); } /** @@ -68,20 +68,27 @@ public class ServerConnectionSecurityForm extends SystemBaseForm private void initDefaults() { - // pull info from preferences and/or persistance model + // pull info from preferences and/or persistence model } - - public void setUseSSL(boolean flag) + public void setAlertSSL(boolean flag) { - _sslForm.setIsChecked(flag); + _sslForm.setSSLALertIsChecked(flag); } - public boolean getUseSSL() + public boolean getAlertSSL() { - return _sslForm.isChecked(); + return _sslForm.isSSLAlertChecked(); } + public void setAlertNonSSL(boolean flag) + { + _sslForm.setNonSSLALertIsChecked(flag); + } + public boolean getAlertNonSSL() + { + return _sslForm.isNonSSLAlertChecked(); + } } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemEditPaneStateMachine.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemEditPaneStateMachine.java index 6a2ff5aad2a..839aa5c6c18 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemEditPaneStateMachine.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemEditPaneStateMachine.java @@ -15,9 +15,9 @@ ********************************************************************************/ package org.eclipse.rse.ui.widgets; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.swt.widgets.Button; @@ -185,7 +185,7 @@ public class SystemEditPaneStateMachine implements ISystemEditPaneStates { if (pendingMsg == null) { - pendingMsg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONFIRM_CHANGES); + pendingMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONFIRM_CHANGES); } SystemMessageDialog pendingMsgDlg = new SystemMessageDialog(composite.getShell(), pendingMsg); try { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemHostCombo.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemHostCombo.java index a61e0816cfb..ae2aae512ac 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemHostCombo.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemHostCombo.java @@ -21,13 +21,13 @@ import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemPreferencesManager; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy; import org.eclipse.rse.model.IHost; import org.eclipse.rse.model.ISystemResourceChangeEvent; import org.eclipse.rse.model.ISystemResourceChangeEvents; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.actions.SystemNewConnectionAction; @@ -169,7 +169,7 @@ public class SystemHostCombo extends Composite implements ISelectionProvider, IS public SystemHostCombo(Composite parent, int style, IHost defaultConnection, String ssFactoryId, boolean showNewButton) { super(parent, style); - restrictSystemTypesTo = SystemPlugin.getTheSystemRegistry().getSubSystemConfiguration(ssFactoryId).getSystemTypes(); + restrictSystemTypesTo = RSEUIPlugin.getTheSystemRegistry().getSubSystemConfiguration(ssFactoryId).getSystemTypes(); init(parent, showNewButton); populateSSFactoryId = ssFactoryId; populateConnectionCombo(connectionCombo, ssFactoryId, defaultConnection); @@ -208,7 +208,7 @@ public class SystemHostCombo extends Composite implements ISelectionProvider, IS super(parent, style); if (showNewButton) // this is expensive, so only need to do this if New is enabled { - ISubSystemConfigurationProxy[] ssfProxies = SystemPlugin.getTheSystemRegistry().getSubSystemConfigurationProxiesByCategory(ssFactoryCategory); + ISubSystemConfigurationProxy[] ssfProxies = RSEUIPlugin.getTheSystemRegistry().getSubSystemConfigurationProxiesByCategory(ssFactoryCategory); Vector vTypes = new Vector(); for (int idx=0; idxISystemValidator object. * If the ISystemValidator reports an error the error message is displayed - * in the Dialog's message line. - * @see SystemUserIdPerSystemTypeDialog#setUserIdValidator(ISystemValidator) + * in the Dialog's message line. */ protected SystemMessage validateNameInput() { diff --git a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/ISystemFilterNamingPolicy.java b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/ISystemFilterNamingPolicy.java index a485a856a0e..a6638a4b8e0 100644 --- a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/ISystemFilterNamingPolicy.java +++ b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/filters/ISystemFilterNamingPolicy.java @@ -17,7 +17,7 @@ package org.eclipse.rse.filters; /** * Allows tool writers to specify the naming standards for the - * persistance files and folders involved with filters. + * persistence files and folders involved with filters. *

* Note that not all methods will be used for all saving policies. *

diff --git a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilter.java b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilter.java index 8ca46eddaa3..02edbc1f025 100644 --- a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilter.java +++ b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilter.java @@ -23,7 +23,6 @@ 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.SystemPlugin; import org.eclipse.rse.filters.ISystemFilter; import org.eclipse.rse.filters.ISystemFilterConstants; import org.eclipse.rse.filters.ISystemFilterContainer; @@ -35,6 +34,7 @@ import org.eclipse.rse.filters.ISystemFilterString; import org.eclipse.rse.filters.SystemFilterSimple; import org.eclipse.rse.internal.references.SystemReferencedObject; import org.eclipse.rse.references.ISystemReferencedObject; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; @@ -65,7 +65,7 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte protected ISystemFilterString[] filterStringObjectArray = null; protected Vector filterStringVector = null; - // persistance + // persistence protected boolean _isDirty = true; protected boolean _wasRestored = false; @@ -1383,7 +1383,7 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte public boolean commit() { - return SystemPlugin.getThePersistenceManager().commit(this); + return RSEUIPlugin.getThePersistenceManager().commit(this); } public boolean wasRestored() diff --git a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterContainerCommonMethods.java b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterContainerCommonMethods.java index 2af0dba6b78..87fe007f8a3 100644 --- a/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterContainerCommonMethods.java +++ b/rse/plugins/org.eclipse.rse.ui/filters/org/eclipse/rse/internal/filters/SystemFilterContainerCommonMethods.java @@ -86,7 +86,7 @@ public class SystemFilterContainerCommonMethods if (exists) { String msg = "Error creating filter: aliasName " + aliasName + " is not unique"; // no need to xlate, internal only - SystemPlugin.logError(msg); + RSEUIPlugin.logError(msg); return null; } */ 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 index 1308fcefda5..db193b2fea3 100644 --- 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 @@ -23,7 +23,6 @@ import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.Platform; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemResourceHelpers; import org.eclipse.rse.filters.ISystemFilter; import org.eclipse.rse.filters.ISystemFilterConstants; @@ -34,6 +33,7 @@ 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; /** @@ -87,7 +87,7 @@ public class SystemFilterPool extends SystemPersistableReferencedObject private boolean debug = false; protected static final String DELIMITER = SystemFilterPoolReference.DELIMITER; - // persistance + // persistence protected boolean _isDirty = true; protected boolean _wasRestored = false; @@ -310,7 +310,7 @@ public class SystemFilterPool extends SystemPersistableReferencedObject { try { - pool = (SystemFilterPool)SystemPlugin.getThePersistenceManager().restoreFilterPool(name); + pool = (SystemFilterPool)RSEUIPlugin.getThePersistenceManager().restoreFilterPool(name); } catch (Exception exc) // real error trying to restore, versus simply not found. { @@ -1034,7 +1034,7 @@ public class SystemFilterPool extends SystemPersistableReferencedObject // special case: data file might not exist, as only started saving it recently. pool = createPool(); ((SystemFilterPoolImpl)pool).specialCaseNoDataRestored = true; - SystemPlugin.logInfo("Created filter pool file " + fileName+".xmi during restore"); + RSEUIPlugin.logInfo("Created filter pool file " + fileName+".xmi during restore"); } else { @@ -1053,7 +1053,7 @@ public class SystemFilterPool extends SystemPersistableReferencedObject } } else - SystemPlugin.logInfo("Hmmm, pool is still null after restore: " + fileName+".xmi"); + RSEUIPlugin.logInfo("Hmmm, pool is still null after restore: " + fileName+".xmi"); */ return pool; } @@ -1382,7 +1382,7 @@ public class SystemFilterPool extends SystemPersistableReferencedObject public boolean commit() { - return SystemPlugin.getThePersistenceManager().commit(this); + return RSEUIPlugin.getThePersistenceManager().commit(this); } public boolean wasRestored() 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 index 66ed061fa31..1992576ad26 100644 --- 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 @@ -21,7 +21,6 @@ import java.util.Vector; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.filters.ISystemFilter; import org.eclipse.rse.filters.ISystemFilterConstants; import org.eclipse.rse.filters.ISystemFilterContainer; @@ -36,6 +35,7 @@ import org.eclipse.rse.logging.Logger; import org.eclipse.rse.model.ISystemProfile; import org.eclipse.rse.persistence.IRSEPersistenceManager; import org.eclipse.rse.references.ISystemBaseReferencingObject; +import org.eclipse.rse.ui.RSEUIPlugin; // // @@ -112,7 +112,7 @@ public class SystemFilterPoolManager implements ISystemFilterPoolManager private Logger logger = null; private ISystemProfile _profile; - // persistance + // persistence protected boolean _isDirty = true; private boolean _wasRestored = false; @@ -265,7 +265,7 @@ public class SystemFilterPoolManager implements ISystemFilterPoolManager namingPolicy = SystemFilterNamingPolicy.getNamingPolicy(); try { - mgr = (SystemFilterPoolManager)SystemPlugin.getThePersistenceManager().restoreFilterPoolManager(profile, logger, caller, name); + mgr = (SystemFilterPoolManager)RSEUIPlugin.getThePersistenceManager().restoreFilterPoolManager(profile, logger, caller, name); /* if (savePolicy != SystemFilterConstants.SAVE_POLICY_NONE) mgr = (SystemFilterPoolManagerImpl)restore(; @@ -314,7 +314,7 @@ public class SystemFilterPoolManager implements ISystemFilterPoolManager for (int idx=0; idx * THE RESULTING CONNECTION OBJECT IS ADDED TO THE LIST OF EXISTING CONNECTIONS FOR YOU. * @param systemType system type matching one of the system type names defined via the - * systemtype extension point. + * systemTypes extension point. * @param aliasName unique connection name. * @param hostName ip name of host. * @return SystemConnection object, or null if it failed to create @@ -161,7 +161,7 @@ public class SystemHostPool extends RSEModelObject implements ISystemHostPool *

* THE RESULTING CONNECTION OBJECT IS ADDED TO THE LIST OF EXISTING CONNECTIONS FOR YOU. * @param systemType system type matching one of the system type names defined via the - * systemtype extension point. + * systemTypes extension point. * @param aliasName unique connection name. * @param hostName ip name of host. * @param description optional description of the connection. Can be null. @@ -178,7 +178,7 @@ public class SystemHostPool extends RSEModelObject implements ISystemHostPool *

* The new connection is added to the list and saved to disk. * @param systemType system type matching one of the system type names defined via the - * systemtype extension point. + * systemTypes extension point. * @param aliasName unique connection name. * @param hostName ip name of host. * @param description optional description of the connection. Can be null. @@ -222,7 +222,7 @@ public class SystemHostPool extends RSEModelObject implements ISystemHostPool *

* @param conn SystemConnection to be updated * @param systemType system type matching one of the system type names defined via the - * systemtype extension point. + * systemTypes extension point. * @param aliasName unique connection name. * @param hostName ip name of host. * @param description optional description of the connection. Can be null. @@ -380,7 +380,7 @@ public class SystemHostPool extends RSEModelObject implements ISystemHostPool getHostList().remove(conn); setDirty(true); - SystemPlugin.getThePersistenceManager().commit(conn.getSystemProfile()); + RSEUIPlugin.getThePersistenceManager().commit(conn.getSystemProfile()); } /** @@ -487,7 +487,7 @@ public class SystemHostPool extends RSEModelObject implements ISystemHostPool */ public boolean commit() { - return SystemPlugin.getThePersistenceManager().commit(this); + return RSEUIPlugin.getThePersistenceManager().commit(this); } /** @@ -529,7 +529,7 @@ public class SystemHostPool extends RSEModelObject implements ISystemHostPool { if (!connection.getAliasName().equalsIgnoreCase(connectionName)) { - SystemPlugin.logDebugMessage(this.getClass().getName(),"Incorrect alias name found in connections.xmi file for " + connectionName+". Name was reset"); + 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); 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 09b89553595..a58e4770225 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 @@ -18,13 +18,16 @@ package org.eclipse.rse.internal.model; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.Platform; import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.rse.core.SystemPlugin; +import org.eclipse.rse.core.IRSESystemType; +import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.model.IHost; import org.eclipse.rse.model.ISystemMessageObject; import org.eclipse.rse.model.ISystemPromptableObject; import org.eclipse.rse.model.SystemMessageObject; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSESystemTypeAdapter; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.actions.SystemNewConnectionAction; import org.eclipse.rse.ui.view.ISystemViewRunnableObject; @@ -53,7 +56,7 @@ public class SystemNewConnectionPromptObject */ public SystemNewConnectionPromptObject() { - systemTypes = SystemPlugin.getDefault().getSystemTypeNames(true); // true=>include local + systemTypes = RSECorePlugin.getDefault().getRegistry().getSystemTypeNames(); isRootPrompt = true; } /** @@ -119,7 +122,7 @@ public class SystemNewConnectionPromptObject } else { - String[] typeNames = SystemPlugin.getDefault().getSystemTypeNames(true); + String[] typeNames = RSECorePlugin.getDefault().getRegistry().getSystemTypeNames(); if (typeNames.length != systemTypes.length) { systemTypes = typeNames; @@ -154,9 +157,12 @@ public class SystemNewConnectionPromptObject public ImageDescriptor getImageDescriptor() { if (hasChildren()) - return SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWCONNECTION_ID); - else - return SystemPlugin.getDefault().getSystemTypeImage(systemTypes[0], false); + return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWCONNECTION_ID); + else { + IRSESystemType sysType = RSECorePlugin.getDefault().getRegistry().getSystemType(systemTypes[0]); + RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(sysType.getAdapter(IRSESystemType.class)); + return adapter.getImageDescriptor(sysType); + } } /** @@ -210,7 +216,7 @@ public class SystemNewConnectionPromptObject } catch (Exception exc) { return new Object[] { - new SystemMessageObject(SystemPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FAILED), + new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FAILED), ISystemMessageObject.MSGTYPE_ERROR,null)}; } @@ -221,11 +227,11 @@ public class SystemNewConnectionPromptObject ISystemMessageObject result = null; if (newConnection != null) { - result = new SystemMessageObject(SystemPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CONNECTIONCREATED), + result = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CONNECTIONCREATED), ISystemMessageObject.MSGTYPE_OBJECTCREATED,null); } else - result = new SystemMessageObject(SystemPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED), + result = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED), ISystemMessageObject.MSGTYPE_CANCEL,null); return new Object[] {result}; } 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 96d02f6fca6..cc59f92f3b2 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,7 +19,6 @@ import java.util.Vector; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.Platform; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.filters.ISystemFilterPool; import org.eclipse.rse.filters.ISystemFilterPoolManager; @@ -27,6 +26,7 @@ import org.eclipse.rse.model.IHost; import org.eclipse.rse.model.ISystemProfile; import org.eclipse.rse.model.ISystemProfileManager; import org.eclipse.rse.model.ISystemRegistry; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; @@ -105,7 +105,7 @@ public class SystemProfile extends RSEModelObject implements ISystemProfile, IAd */ public IHost createHost(String systemType, String connectionName, String hostName, String description) throws Exception { - return SystemPlugin.getTheSystemRegistry().createHost(getName(), systemType, connectionName, hostName, description); + return RSEUIPlugin.getTheSystemRegistry().createHost(getName(), systemType, connectionName, hostName, description); } /** @@ -113,14 +113,14 @@ public class SystemProfile extends RSEModelObject implements ISystemProfile, IAd */ public IHost[] getHosts() { - return SystemPlugin.getTheSystemRegistry().getHostsByProfile(this); + return RSEUIPlugin.getTheSystemRegistry().getHostsByProfile(this); } /** * Return all filter pools for this profile */ public ISystemFilterPool[] getFilterPools() { - ISubSystemConfiguration[] ssFactories = SystemPlugin.getTheSystemRegistry().getSubSystemConfigurations(); + ISubSystemConfiguration[] ssFactories = RSEUIPlugin.getTheSystemRegistry().getSubSystemConfigurations(); Vector poolsVector = new Vector(); for (int idx = 0; idx < ssFactories.length; idx++) { @@ -236,7 +236,7 @@ public class SystemProfile extends RSEModelObject implements ISystemProfile, IAd public boolean commit() { - return SystemPlugin.getThePersistenceManager().commit(this); + return RSEUIPlugin.getThePersistenceManager().commit(this); } } \ No newline at end of file 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 19842ed0169..d9415a4ffd0 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 @@ -20,13 +20,13 @@ import java.util.List; import java.util.Vector; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemPreferencesManager; import org.eclipse.rse.core.SystemResourceManager; import org.eclipse.rse.model.ISystemProfile; import org.eclipse.rse.model.ISystemProfileManager; import org.eclipse.rse.model.SystemStartHere; import org.eclipse.rse.ui.ISystemPreferencesConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.validators.ISystemValidator; import org.eclipse.rse.ui.validators.ValidatorProfileName; @@ -67,7 +67,7 @@ public class SystemProfileManager implements ISystemProfileManager defaultInst = new SystemProfileManager(); // restores all of RSE - SystemPlugin.getThePersistenceManager().restore(defaultInst); + RSEUIPlugin.getThePersistenceManager().restore(defaultInst); } return defaultInst; } @@ -106,7 +106,7 @@ public class SystemProfileManager implements ISystemProfileManager SystemPreferencesManager.getPreferencesManager().addActiveProfile(name); ((SystemProfile)newProfile).setActive(makeActive); } - SystemPlugin.getThePersistenceManager().commit(this); + RSEUIPlugin.getThePersistenceManager().commit(this); return newProfile; } @@ -183,7 +183,7 @@ public class SystemProfileManager implements ISystemProfileManager for (int idx=0; (!defaultProfileExist) && (idx 0)) { newConns = new IHost[conns.length]; - SystemMessage msgNoSubs = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COPYCONNECTION_PROGRESS); + SystemMessage msgNoSubs = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYCONNECTION_PROGRESS); for (int idx = 0; idx < conns.length; idx++) { msgNoSubs.makeSubstitution(conns[idx].getAliasName()); @@ -930,7 +931,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents //try { java.lang.Thread.sleep(3000l); } catch (InterruptedException e) {} } } - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COPYFILTERPOOLS_PROGRESS).getLevelOneText(); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYFILTERPOOLS_PROGRESS).getLevelOneText(); monitor.subTask(msg); SystemBasePlugin.logDebugMessage(this.getClass().getName(), msg); @@ -949,7 +950,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents monitor.worked(1); // STEP 6: COPY ALL SUBSYSTEMS FOR EACH COPIED CONNECTION - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COPYSUBSYSTEMS_PROGRESS).getLevelOneText(); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYSUBSYSTEMS_PROGRESS).getLevelOneText(); monitor.subTask(msg); SystemBasePlugin.logDebugMessage(this.getClass().getName(), msg); if ((conns != null) && (conns.length > 0)) @@ -994,7 +995,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents deleteHost(newConns[idx]); for (int idx = 0; idx < subsystemFactoryProxies.length; idx++) { - ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemFactory(); + ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration(); if (factory != null) factory.deletingSystemProfile(newProfile); } @@ -1043,7 +1044,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents { for (int idx = 0; idx < subsystemFactoryProxies.length; idx++) { - ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemFactory(); + ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration(); if (factory != null) factory.deletingSystemProfile(profile); } @@ -1071,7 +1072,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents { //if (subsystemFactoryProxies[idx].isSubSystemFactoryActive()) // don't bother if not yet alive { - ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemFactory(); + ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration(); if (factory != null) { ISubSystem[] activeReferences = factory.testForActiveReferences(profile); @@ -1097,7 +1098,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents } ISubSystem firstSubSystem = (ISubSystem) activeReferenceVector.elementAt(0); String connectionName = firstSubSystem.getHost().getSystemProfileName() + "." + firstSubSystem.getHost().getAliasName(); - SystemMessage sysMsg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_LOADING_PROFILE_SHOULDNOTBE_DEACTIVATED); + SystemMessage sysMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_LOADING_PROFILE_SHOULDNOTBE_DEACTIVATED); sysMsg.makeSubstitution(profile.getName(), connectionName); SystemBasePlugin.logWarning(sysMsg.getFullMessageID() + ": " + sysMsg.getLevelOneText()); SystemMessageDialog msgDlg = new SystemMessageDialog(null, sysMsg); @@ -1113,9 +1114,9 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents { for (int idx = 0; idx < subsystemFactoryProxies.length; idx++) { - if (subsystemFactoryProxies[idx].isSubSystemFactoryActive()) // don't bother if not yet alive + if (subsystemFactoryProxies[idx].isSubSystemConfigurationActive()) // don't bother if not yet alive { - ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemFactory(); + ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration(); if (factory != null) factory.changingSystemProfileActiveStatus(profile, makeActive); } @@ -1213,7 +1214,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents { if (subsystemFactoryProxies[idx].appliesToSystemType(conn.getSystemType())) { - ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemFactory(); + ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration(); if (factory != null) { ISubSystem[] sss = factory.getSubSystems(conn, force); @@ -1365,9 +1366,9 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents { for (int idx = 0; idx < subsystemFactoryProxies.length; idx++) { - if (subsystemFactoryProxies[idx].appliesToSystemType(conn.getSystemType()) && subsystemFactoryProxies[idx].isSubSystemFactoryActive()) + if (subsystemFactoryProxies[idx].appliesToSystemType(conn.getSystemType()) && subsystemFactoryProxies[idx].isSubSystemConfigurationActive()) { - ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemFactory(); + ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration(); if (factory != null) { ISubSystem[] sss = factory.getSubSystems(conn, ISubSystemConfiguration.LAZILY); @@ -1474,7 +1475,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents for (int idx = 0; idx < proxies.length; idx++) { - v.add(proxies[idx].getSubSystemFactory()); + v.add(proxies[idx].getSubSystemConfiguration()); } } return (ISubSystemConfiguration[])v.toArray(new ISubSystemConfiguration[v.size()]); @@ -1606,7 +1607,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents public IHost getLocalHost() { IHost localConn = null; - IHost[] conns = getHostsBySystemType(ISystemTypes.SYSTEMTYPE_LOCAL); + IHost[] conns = getHostsBySystemType(IRSESystemType.SYSTEMTYPE_LOCAL); if (conns != null && conns.length > 0) return conns[0]; else return localConn; } @@ -1706,7 +1707,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents { if (subsystemFactoryProxies[idx].getCategory().equals(factoryCategory)) { - ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemFactory(); + ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration(); if (factory != null) { ISubSystem[] subsystems = factory.getSubSystems(true); // true ==> force full restore @@ -1898,7 +1899,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents } } } - if ((systemType != null) && (systemType.equals(ISystemTypes.SYSTEMTYPE_LOCAL) && (v.size() == 0))) + if ((systemType != null) && (systemType.equals(IRSESystemType.SYSTEMTYPE_LOCAL) && (v.size() == 0))) v.addElement("localhost"); String[] names = new String[v.size()]; for (int idx = 0; idx < names.length; idx++) @@ -1935,7 +1936,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents String subSystemId = str.substring(0, subsystemDelim); String srcKey = str.substring(subsystemDelim + 1, str.length()); - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); ISubSystem subSystem = registry.getSubSystem(subSystemId); if (subSystem != null) { @@ -1957,14 +1958,14 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents } else { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND); msg.makeSubstitution(srcKey, subSystem.getHostAliasName()); return msg; } } else { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_CONNECTION_NOTFOUND); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_CONNECTION_NOTFOUND); msg.makeSubstitution(subSystemId); return msg; } @@ -2080,7 +2081,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents try { localConn = createHost( - profile.getName(), ISystemTypes.SYSTEMTYPE_LOCAL, + profile.getName(), IRSESystemType.SYSTEMTYPE_LOCAL, name, // connection name "localhost", // hostname "", // description @@ -2112,7 +2113,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents *

* @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 - * systemtype extension point. + * systemTypes extension point. * @param connectionName unique connection name. * @param hostName ip name of host. * @param description optional description of the connection. Can be null. @@ -2138,7 +2139,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents lastException = null; ISystemHostPool pool = getHostPool(profileName); IHost conn = null; - boolean promptable = false; // systemType.equals(ISystemTypes.SYSTEMTYPE_PROMPT); + boolean promptable = false; // systemType.equals(IRSESystemType.SYSTEMTYPE_PROMPT); try { // create, register and save new connection... @@ -2217,7 +2218,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents *

* @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 - * systemtype extension point. + * systemTypes extension point. * @param connectionName unique connection name. * @param hostName ip name of host. * @param description optional description of the connection. Can be null. @@ -2244,7 +2245,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents * *

* @param systemType system type matching one of the system type names defined via the - * systemtype extension point. + * systemTypes extension point. * @param connectionName unique connection name. * @param hostName ip name of host. * @param description optional description of the connection. Can be null. @@ -2296,7 +2297,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents *

* @param conn SystemConnection to be updated * @param systemType system type matching one of the system type names defined via the - * systemtype extension point. + * systemTypes extension point. * @param connectionName unique connection name. * @param hostName ip name of host. * @param description optional description of the connection. Can be null. @@ -2494,7 +2495,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents newConn = oldPool.cloneHost(targetPool, conn, newName); // STEP 2: COPY ALL SUBSYSTEMS FOR THE COPIED CONNECTION - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COPYSUBSYSTEMS_PROGRESS).getLevelOneText(); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPYSUBSYSTEMS_PROGRESS).getLevelOneText(); //monitor.subTask(msg); SystemBasePlugin.logDebugMessage(this.getClass().getName(), msg); @@ -2576,7 +2577,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents } catch (Exception exc) { - //SystemPlugin.logError("Exception moving system connection " + conn.getAliasName() + " to profile " + targetProfile.getName(), exc); + //RSEUIPlugin.logError("Exception moving system connection " + conn.getAliasName() + " to profile " + targetProfile.getName(), exc); throw exc; } return newConn; @@ -3086,7 +3087,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents if (proxies != null) { for (int idx = 0; idx < proxies.length; idx++) - proxies[idx].getSubSystemFactory(); + proxies[idx].getSubSystemConfiguration(); } // step 0_b: force every subsystem of every connection to be active! @@ -3116,7 +3117,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents public boolean save() { ISystemProfileManager profileManager = getSystemProfileManager(); - return SystemPlugin.getThePersistenceManager().commit(profileManager); + return RSEUIPlugin.getThePersistenceManager().commit(profileManager); } /** @@ -3125,7 +3126,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents */ public boolean saveHostPool(ISystemHostPool pool) { - return SystemPlugin.getThePersistenceManager().commit(pool); + return RSEUIPlugin.getThePersistenceManager().commit(pool); } /** @@ -3134,7 +3135,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents */ public boolean saveHost(IHost conn) { - return SystemPlugin.getThePersistenceManager().commit(conn); + return RSEUIPlugin.getThePersistenceManager().commit(conn); } /** @@ -3150,7 +3151,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents SystemHostPool pool = null; SystemPreferencesManager prefmgr = SystemPreferencesManager.getPreferencesManager(); - if (!SystemPlugin.getThePersistenceManager().restore(profileManager)) + if (!RSEUIPlugin.getThePersistenceManager().restore(profileManager)) { SystemProfile[] profiles = profileManager.getActiveSystemProfiles(); for (int idx = 0; idx < profiles.length; idx++) @@ -3164,7 +3165,7 @@ public class SystemRegistry implements ISystemRegistry, ISystemModelChangeEvents catch (Exception exc) { lastException = exc; - SystemPlugin.logError("Exception in restore for connection pool " + profiles[idx].getName(), exc); + RSEUIPlugin.logError("Exception in restore for connection pool " + profiles[idx].getName(), exc); } } } 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 index 8f8db3798ab..0a300b06ca0 100644 --- 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 @@ -72,7 +72,7 @@ public interface ISystemHostPool extends IRSEPersistableContainer *

* @param conn SystemConnection to be updated * @param systemType system type matching one of the system type names defined via the - * systemtype extension point. + * systemType extension point. * @param aliasName unique connection name. * @param hostName ip name of host. * @param description optional description of the connection. Can be null. 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 index 1d72bd4d1e0..0e402d00636 100644 --- 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 @@ -37,8 +37,8 @@ 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.core.SystemPlugin#getTheSystemRegistry() getTheSystemRegistry} - * method in the SystemPlugin object. + * 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 @@ -90,9 +90,9 @@ public interface ISystemRegistry extends ISystemViewInputProvider, ISchedulingRu // SUBSYSTEM FACTORY METHODS... // ---------------------------- /** - * Private method used by SystemPlugin to tell registry all registered subsystem + * 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 - * SystemPlugin. + * RSEUIPlugin. */ public void setSubSystemConfigurationProxies(ISubSystemConfigurationProxy[] proxies); /** @@ -466,7 +466,7 @@ public interface ISystemRegistry extends ISystemViewInputProvider, ISchedulingRu *

* @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 - * systemtype extension point. + * systemTypes extension point. * @param connectionName unique connection name. * @param hostName ip name of host. * @param description optional description of the connection. Can be null. @@ -498,7 +498,7 @@ public interface ISystemRegistry extends ISystemViewInputProvider, ISchedulingRu *

* @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 - * systemtype extension point. + * systemTypes extension point. * @param connectionName unique connection name. * @param hostName ip name of host. * @param description optional description of the connection. Can be null. @@ -523,7 +523,7 @@ public interface ISystemRegistry extends ISystemViewInputProvider, ISchedulingRu * *

* @param systemType system type matching one of the system type names defined via the - * systemtype extension point. + * systemTypes extension point. * @param connectionName unique connection name. * @param hostName ip name of host. * @param description optional description of the connection. Can be null. @@ -548,7 +548,7 @@ public interface ISystemRegistry extends ISystemViewInputProvider, ISchedulingRu *

* @param conn SystemConnection to be updated * @param systemType system type matching one of the system type names defined via the - * systemtype extension point. + * systemTypes extension point. * @param connectionName unique connection name. * @param hostName ip name of host. * @param description optional description of the connection. Can be null. 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 index fb38eedb209..8780712f114 100644 --- 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 @@ -41,7 +41,7 @@ public final class SystemSignonInformation { * Constructor for SystemSignonInformation. */ public SystemSignonInformation(String hostname, String userid, String systemType) { - _hostname = hostname;//SystemPlugin.getQualifiedHostName(hostname).toUpperCase(); + _hostname = hostname;//RSEUIPlugin.getQualifiedHostName(hostname).toUpperCase(); _userid = userid; _systemType = systemType; } @@ -50,7 +50,7 @@ public final class SystemSignonInformation { * Constructor for SystemSignonInformation. */ public SystemSignonInformation(String hostname, String userid, String password, String systemType) { - _hostname = hostname;//SystemPlugin.getQualifiedHostName(hostname).toUpperCase(); + _hostname = hostname;//RSEUIPlugin.getQualifiedHostName(hostname).toUpperCase(); _userid = userid; _password = password; _systemType = systemType; @@ -99,7 +99,7 @@ public final class SystemSignonInformation { * @param hostname The hostname to set */ public void setHostname(String hostname) { - _hostname = hostname;//SystemPlugin.getQualifiedHostName(hostname).toUpperCase(); + _hostname = hostname;//RSEUIPlugin.getQualifiedHostName(hostname).toUpperCase(); } /** 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 523d0baf806..1e6314edeea 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,10 +15,10 @@ ********************************************************************************/ package org.eclipse.rse.model; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.internal.model.SystemProfileManager; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -29,11 +29,11 @@ public class SystemStartHere /** * STEP 1. Get system registry singleton *

- * SAME AS: SystemPlugin.getTheSystemRegistry + * SAME AS: RSEUIPlugin.getTheSystemRegistry */ public static ISystemRegistry getSystemRegistry() { - return SystemPlugin.getTheSystemRegistry(); + return RSEUIPlugin.getTheSystemRegistry(); } /** @@ -60,7 +60,7 @@ public class SystemStartHere *

  • "Linux" *
  • "Local" * - * @see org.eclipse.rse.core.ISystemTypes + * @see org.eclipse.rse.core.IRSESystemType * @see org.eclipse.rse.model.ISystemRegistry#getHostsBySystemType(String) */ public static IHost[] getConnectionsBySystemType(String systemType) 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 index 75e5ac16987..fed52dd8521 100644 --- 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 @@ -16,11 +16,16 @@ package org.eclipse.rse.internal.persistence; +import java.util.HashMap; +import java.util.Map; 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.rse.core.SystemPlugin; +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.rse.core.SystemResourceManager; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.filters.ISystemFilter; @@ -35,11 +40,10 @@ 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.DefaultRSEPersistenceProvider; 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; public class RSEPersistenceManager implements IRSEPersistenceManager { @@ -47,11 +51,12 @@ public class RSEPersistenceManager implements IRSEPersistenceManager public static final int STATE_IMPORTING = 1; public static final int STATE_EXPORTING = 2; + private Map loadedProviders = new HashMap(10); + private int _currentState = STATE_NONE; private RSEDOMExporter _exporter; private RSEDOMImporter _importer; - private IRSEPersistenceProvider _persistenceProvider; public RSEPersistenceManager() { @@ -59,18 +64,57 @@ public class RSEPersistenceManager implements IRSEPersistenceManager _importer = RSEDOMImporter.getInstance(); } - public void registerRSEPersistenceProvider(IRSEPersistenceProvider provider) + public void registerRSEPersistenceProvider(String id, IRSEPersistenceProvider provider) { - _persistenceProvider = provider; + loadedProviders.put(id, provider); } - public IRSEPersistenceProvider getRSEPersistanceProvider() - { - if (_persistenceProvider == null) - { - _persistenceProvider = new DefaultRSEPersistenceProvider(); + /** + * 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) { + IRSEPersistenceProvider provider = (IRSEPersistenceProvider) loadedProviders.get(id); + if (provider == null) { + IExtensionRegistry registry = Platform.getExtensionRegistry(); + IConfigurationElement[] providerCandidates = registry.getConfigurationElementsFor("org.eclipse.rse.ui", "persistenceProviders"); + for (int j = 0; j < providerCandidates.length; j++) { + IConfigurationElement providerCandidate = providerCandidates[j]; + if (providerCandidate.getName().equals("persistenceProvider")) { + String candidateId = providerCandidate.getAttribute("id"); + if (candidateId != null) { + if (candidateId.equals(id)) { + try { + provider = (IRSEPersistenceProvider) providerCandidate.createExecutableExtension("class"); + } catch (CoreException e) { + RSEUIPlugin.logError("Exception loading persistence provider", e); // TODO: dwd nls + } + } + } else { + RSEUIPlugin.logError("Missing id attribute in persistenceProvider element"); // TODO: dwd nls + } + } else { + RSEUIPlugin.logError("Invalid element in persistenceProviders extension point"); // TODO: dwd nls + } + } + if (provider == null) { + RSEUIPlugin.logError("Persistence provider not found."); // TODO: dwd nls + } + loadedProviders.put(id, provider); // even if provider is null } - return _persistenceProvider; + 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.SerializingProvider"); + return provider; } @@ -147,7 +191,7 @@ public class RSEPersistenceManager implements IRSEPersistenceManager * SystemConnection connection = (SystemConnection)iList.next(); if * (connection != null) { if * (!connection.getAliasName().equalsIgnoreCase(connectionName)) { - * SystemPlugin.logDebugMessage(this.getClass().getName(),"Incorrect + * 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; @@ -173,7 +217,7 @@ public class RSEPersistenceManager implements IRSEPersistenceManager } return true; */ - return false; // all persistance should be at profile level + return false; // all persistence should be at profile level } public boolean commit(ISystemFilterPoolManager filterPoolManager) @@ -199,7 +243,7 @@ public class RSEPersistenceManager implements IRSEPersistenceManager public boolean restore(ISystemFilterPool filterPool) { System.out.println("restore filterpool"); - // TODO Auto-generated method stub + // TODO: dwd function return false; } @@ -207,6 +251,7 @@ public class RSEPersistenceManager implements IRSEPersistenceManager public boolean commit(ISystemFilter filter) { System.out.println("commit filter"); + // TODO: dwd function /* if (filter.isDirty()) { @@ -226,7 +271,7 @@ public class RSEPersistenceManager implements IRSEPersistenceManager public ISystemFilterPool restoreFilterPool(String name) { System.out.println("restore filter pool "+name); - // FIXME + // TODO: dwd function return null; } @@ -239,7 +284,7 @@ public class RSEPersistenceManager implements IRSEPersistenceManager try { // commit everything for now - ISystemProfileManager mgr = SystemPlugin.getTheSystemRegistry().getSystemProfileManager(); + ISystemProfileManager mgr = RSEUIPlugin.getTheSystemRegistry().getSystemProfileManager(); commit(mgr); subSystem.setDirty(false); } @@ -287,7 +332,6 @@ public class RSEPersistenceManager implements IRSEPersistenceManager { if (profile != null) { - String name = profile.getName(); return save(profile, false); } return false; @@ -370,10 +414,10 @@ public class RSEPersistenceManager implements IRSEPersistenceManager if (dom.needsSave() && !dom.saveScheduled()) { - IProject project = SystemResourceManager.getRemoteSystemsProject(); +// IProject project = SystemResourceManager.getRemoteSystemsProject(); - SaveRSEDOMJob job = new SaveRSEDOMJob(this, dom, getRSEPersistanceProvider()); - //job.setRule(project); + SaveRSEDOMJob job = new SaveRSEDOMJob(this, dom, getRSEPersistenceProvider()); +// job.setRule(project); job.schedule(); dom.markSaveScheduled(); } @@ -412,7 +456,13 @@ public class RSEPersistenceManager implements IRSEPersistenceManager public RSEDOM importRSEDOM(ISystemProfileManager profileManager, String domName) { - RSEDOM dom = getRSEPersistanceProvider().loadRSEDOM(profileManager, domName, null); + RSEDOM dom = null; + IRSEPersistenceProvider provider = getRSEPersistenceProvider(); + if (provider != null) { + dom = provider.loadRSEDOM(profileManager, domName, null); + } else { + RSEUIPlugin.logError("Persistence provider is not available."); // TODO: dwd NLS + } return dom; } 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 index 0cb7a5f5215..e81516e4c2a 100644 --- 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 @@ -86,7 +86,7 @@ public class RSEDOMExporter implements IRSEDOMExporter } /** - * Creates an RSE DOM for use in persistance + * Creates an RSE DOM for use in persistence * @param dom * @param profile * @return 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 index 44245447689..a276deea634 100644 --- 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 @@ -18,7 +18,6 @@ package org.eclipse.rse.internal.persistence.dom; import java.util.Vector; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.internal.subsystems.SubSystemFilterNamingPolicy; import org.eclipse.rse.core.servicesubsystem.IServiceSubSystem; import org.eclipse.rse.core.servicesubsystem.IServiceSubSystemConfiguration; @@ -47,6 +46,7 @@ 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 @@ -254,7 +254,7 @@ public class RSEDOMImporter implements IRSEDOMImporter if (factory instanceof IServiceSubSystemConfiguration) { IServiceSubSystemConfiguration serviceFactory = (IServiceSubSystemConfiguration)factory; - ISubSystem[] existingSubSystems = SystemPlugin.getTheSystemRegistry().getServiceSubSystems(serviceFactory.getServiceType(), host); + ISubSystem[] existingSubSystems = RSEUIPlugin.getTheSystemRegistry().getServiceSubSystems(serviceFactory.getServiceType(), host); if (existingSubSystems != null && existingSubSystems.length > 0) { subSystem = existingSubSystems[0]; @@ -264,7 +264,7 @@ public class RSEDOMImporter implements IRSEDOMImporter } else { - ISubSystem[] existingSubSystems = SystemPlugin.getTheSystemRegistry().getSubSystems(type, host); + ISubSystem[] existingSubSystems = RSEUIPlugin.getTheSystemRegistry().getSubSystems(type, host); if (existingSubSystems != null && existingSubSystems.length > 0) { @@ -532,6 +532,6 @@ public class RSEDOMImporter implements IRSEDOMImporter private ISubSystemConfiguration getFactoryFor(String id) { - return SystemPlugin.getTheSystemRegistry().getSubSystemConfiguration(id); + return RSEUIPlugin.getTheSystemRegistry().getSubSystemConfiguration(id); } } \ 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 index b6213540e35..0b7ce3e938b 100644 --- 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 @@ -31,10 +31,12 @@ import org.eclipse.rse.model.ISystemProfileManager; public interface IRSEPersistenceManager { /** - * Register the persistance provider to be used when saving and restoring RSE doms - * @param provider + * 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(IRSEPersistenceProvider provider); + public void registerRSEPersistenceProvider(String id, IRSEPersistenceProvider provider); /** * Restore all profiles 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 index 1e84b74d1a0..71aa54d9aeb 100644 --- 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 @@ -23,7 +23,7 @@ import org.eclipse.rse.persistence.dom.RSEDOM; /** * This is the interface that needs to be implemented when providing an extension - * using the RSE persistance provider extension point. + * using the RSE persistence provider extension point. * * Implement this class to provide a specialized means of * saving and restoring RSEDOM diff --git a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/PropertyFileProvider.java b/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/PropertyFileProvider.java new file mode 100644 index 00000000000..29cf82cc99d --- /dev/null +++ b/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/PropertyFileProvider.java @@ -0,0 +1,98 @@ +/******************************************************************************** + * 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.persistence; + +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.rse.core.SystemResourceManager; +import org.eclipse.rse.model.ISystemProfileManager; +import org.eclipse.rse.persistence.dom.RSEDOM; + +/** + * 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. + */ +// TODO: dwd WIP +public class PropertyFileProvider implements IRSEPersistenceProvider { + + /* (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) { + String profileName = dom.getName(); + IFolder profileFolder = getFolder(profileName, monitor); + System.out.println("saving to " + profileFolder.getFullPath().toString() + "..."); // TODO: dwd debugging + try { + // TODO: dwd function + } catch (Exception e) { + e.printStackTrace(); + return false; + } + return true; + } + + /* (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(ISystemProfileManager profileManager, String profileName, IProgressMonitor monitor) { + RSEDOM dom = null; + IFolder profileFolder = getFolder(profileName, monitor); + if (profileFolder.exists()) { + System.out.println("loading from " + profileFolder.getFullPath().toString() + "..."); // TODO: dwd debugging + try { + // TODO: dwd function + } catch (Exception e) { + e.printStackTrace(); + try { + profileFolder.delete(true, false, monitor); + } catch (Exception e2) { + e.printStackTrace(); + } + } + } + return dom; + } + + /** + * Returns the IFolder in which a profile can be stored. The folder is unique to + * the type of persistence provider. + * @param monitor a progress monitor. + * @return The folder that was created or found. + */ + private IFolder getFolder(String profileName, IProgressMonitor monitor) { + IProject project = SystemResourceManager.getRemoteSystemsProject(); + try { + project.refreshLocal(IResource.DEPTH_INFINITE, monitor); // ensure RemoteSystemsConnections project is in sync with the file system. + } catch (Exception e) { + } + IFolder providerFolder = project.getFolder("org.eclipse.rse.dom.properties"); + if (!providerFolder.exists()) { + try { + providerFolder.create(true, true, monitor); + } catch (Exception e) { + } + } + IFolder profileFolder = providerFolder.getFolder(profileName); + if (!profileFolder.exists()) { + try { + profileFolder.create(true, true, monitor); + } catch (Exception e) { + } + } + return profileFolder; + } + +} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/DefaultRSEPersistenceProvider.java b/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/SerializingProvider.java similarity index 96% rename from rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/DefaultRSEPersistenceProvider.java rename to rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/SerializingProvider.java index 9e3c0e9ced3..41e29d7a323 100644 --- a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/DefaultRSEPersistenceProvider.java +++ b/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/persistence/SerializingProvider.java @@ -38,7 +38,7 @@ import org.eclipse.rse.persistence.dom.RSEDOM; * @author dmcknigh * */ -public class DefaultRSEPersistenceProvider implements IRSEPersistenceProvider +public class SerializingProvider implements IRSEPersistenceProvider { /** @@ -54,7 +54,7 @@ public class DefaultRSEPersistenceProvider implements IRSEPersistenceProvider IFile profileFile = getProfileFile(domName, monitor); if (profileFile.exists()) { - System.out.println("loading "+ profileFile.getLocation().toOSString() + "..."); + System.out.println("loading "+ profileFile.getLocation().toOSString() + "..."); // TODO: dwd debugging try { InputStream iStream = profileFile.getContents(); @@ -118,7 +118,7 @@ public class DefaultRSEPersistenceProvider implements IRSEPersistenceProvider IFile profileFile = getProfileFile(dom.getName(), monitor); File osFile = profileFile.getLocation().toFile(); - System.out.println("saving "+ osFile.getAbsolutePath() + "..."); + System.out.println("saving "+ osFile.getAbsolutePath() + "..."); // TODO: dwd debugging try { OutputStream oStream = new FileOutputStream(osFile); 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 index fb971b21df1..974b43ef55e 100644 --- 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 @@ -40,7 +40,7 @@ public interface IRSEDOMExporter RSEDOM createRSEDOM(ISystemProfile profile, boolean clean); /** - * Creates an RSE DOM for use in persistance + * Creates an RSE DOM for use in persistence * @param dom * @param profile * @return diff --git a/rse/plugins/org.eclipse.rse.ui/plugin.xml b/rse/plugins/org.eclipse.rse.ui/plugin.xml index 1b038ba0ae8..82948f5f769 100644 --- a/rse/plugins/org.eclipse.rse.ui/plugin.xml +++ b/rse/plugins/org.eclipse.rse.ui/plugin.xml @@ -32,8 +32,8 @@ Contributors: - - + + @@ -45,19 +45,19 @@ Contributors: - + - + - - - + + + @@ -73,7 +73,7 @@ Contributors: - + @@ -93,7 +93,7 @@ Contributors: - + @@ -140,7 +140,7 @@ Contributors: - + @@ -229,7 +229,7 @@ Contributors: - + @@ -468,10 +468,8 @@ Contributors: - + - - @@ -552,69 +550,73 @@ Contributors: - + - - - + + + + - - + + + + - + + + @@ -833,7 +835,7 @@ Contributors: - + @@ -980,16 +982,20 @@ Contributors: - + + class="org.eclipse.rse.persistence.SerializingProvider" + id="org.eclipse.rse.persistence.SerializingProvider" + name="Serializing Persistence Provider"/> + - + - This extension point is used to allow the delegation of client persistences to vendors where needed. + This extension point is used to allow the delegation of profile persistence to vendors where needed. @@ -73,7 +73,7 @@ - 8.0.0 + 1.0.0 diff --git a/rse/plugins/org.eclipse.rse.ui/schema/rseConfigDefaults.exsd b/rse/plugins/org.eclipse.rse.ui/schema/rseConfigDefaults.exsd index 00ee61496cf..a0fb60e6523 100644 --- a/rse/plugins/org.eclipse.rse.ui/schema/rseConfigDefaults.exsd +++ b/rse/plugins/org.eclipse.rse.ui/schema/rseConfigDefaults.exsd @@ -64,7 +64,7 @@ - Specify comma-separated list of system types to enable. Specify the system type names, not translated. These are not case sensitive. All other system types will be disabled, but user can enable them via preferences. Disabled system types do not appear in the New Connection wizard. + Specify semicolon-separated list of system type names to enable. Specify the system type names, not translated. These are not case sensitive. All other system types will be disabled, but user can enable them via preferences. Disabled system types do not appear in the New Connection wizard. @@ -98,7 +98,7 @@ The following is an example of how to turn off the showing of the new connection <pre> <extension point="org.eclipse.rse.ui.rseConfigDefaults"> <defaults id="xyz" productId="com.mycompany.myproduct" showNewConnectionPrompt="false" showLocalConnection="true" - enableSystemTypes="Local;Power Linux;Unix;iSeries"> + enableSystemTypes="Local;Linux;Unix"> </defaults> </extension> </pre> diff --git a/rse/plugins/org.eclipse.rse.ui/schema/subsystemConfiguration.exsd b/rse/plugins/org.eclipse.rse.ui/schema/subsystemConfiguration.exsd index 477872c16d2..f50ca325c14 100644 --- a/rse/plugins/org.eclipse.rse.ui/schema/subsystemConfiguration.exsd +++ b/rse/plugins/org.eclipse.rse.ui/schema/subsystemConfiguration.exsd @@ -132,11 +132,11 @@ Remote System Explorer perspective. - + - A semi-colon separated list of system types that subsystems from this configuration support. -For example, "Windows;Unix;Linux". If not specified, defaults to all system types. + A semicolon separated list of system types that subsystems from this configuration support. +For example, "Unix;Linux". If not specified, defaults to all system types. diff --git a/rse/plugins/org.eclipse.rse.ui/schema/systemtype.exsd b/rse/plugins/org.eclipse.rse.ui/schema/systemtype.exsd index 7a76b454db3..81f8685156a 100644 --- a/rse/plugins/org.eclipse.rse.ui/schema/systemtype.exsd +++ b/rse/plugins/org.eclipse.rse.ui/schema/systemtype.exsd @@ -3,12 +3,12 @@ - + - This extension point is used in combination with the org.eclipse.rse.ui.subsystemfactory + This extension point is used in combination with the org.eclipse.rse.ui.subsystemConfiguration extension point for defining new subsystems, which appear under a connection when it is expanded in the -Remote Systems view. The systemtype extension point allows subsystem providers to define a new system +Remote Systems view. The systemType extension point allows subsystem providers to define a new system type that appears in the list of valid system types in the New Connection wizard, used by users when defining a new connection to a remote system. The system type is simply a string identifying the operating system type, such as Solaris, and an pair of icons used to identify connections to systems of this type. One @@ -57,16 +57,11 @@ icon is used when the connection is not connected, while the other is used when - The display name for the system type, such as "Solaris". IBM pre-defines a number of system types, although they may not appear until a subsystem factory is registered against that type. These are the IBM-supplied system types: + The display name for the system type, such as "Solaris". RSE pre-defines a number of system types, although they may not appear unless a subsystem configuration is registered against that type. These are the supplied system types: <ul> <li>Local</li> -<li>Windows</li> <li>Unix</li> <li>Linux</li> -<li>AIX</li> -<li>Power Linux</li> -<li>iSeries</li> -<li>z/OS</li> </ul> @@ -112,7 +107,7 @@ attribute, adorned with a bright green arrow. The following is an example of the extension point schema: <p> <pre> - <extension point="org.eclipse.rse.ui.systemtype"> + <extension point="org.eclipse.rse.ui.systemType"> <type id="com.acme.systemtype.Solaris" name="Solaris" iconlive="icons/solarisLive.gif" @@ -147,7 +142,7 @@ attribute, adorned with a bright green arrow. -Copyright (c) 2002, 2006 IBM Corporation. All Rights Reserved. + 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 diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/IBMServerLauncherConstants.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/IBMServerLauncherConstants.java index 9fadf7fa05a..13dcc7dda35 100644 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/IBMServerLauncherConstants.java +++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/IBMServerLauncherConstants.java @@ -16,7 +16,7 @@ package org.eclipse.rse.core.internal.subsystems; -import org.eclipse.rse.core.ISystemTypes; +import org.eclipse.rse.core.IRSESystemType; /** * This interface defines constants for IBM Server Launcher. @@ -42,12 +42,12 @@ public interface IBMServerLauncherConstants /** * Linux REXEC script command, "perl ./server.linux". */ - public static final String LINUX_REXEC_SCRIPT = "perl ./server." + ISystemTypes.SYSTEMTYPE_LINUX.toLowerCase(); + public static final String LINUX_REXEC_SCRIPT = "perl ./server." + IRSESystemType.SYSTEMTYPE_LINUX.toLowerCase(); /** * Unix REXEC script command, "./server.unix". */ - public static final String UNIX_REXEC_SCRIPT = "./server." + ISystemTypes.SYSTEMTYPE_UNIX.toLowerCase(); + public static final String UNIX_REXEC_SCRIPT = "./server." + IRSESystemType.SYSTEMTYPE_UNIX.toLowerCase(); /** * Default REXEC script command. TIt is equivalent to LINUX_REXEC_SCRIPT. diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/ServerLauncher.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/ServerLauncher.java index 755949e3321..bda3dfccafc 100644 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/ServerLauncher.java +++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/ServerLauncher.java @@ -15,11 +15,11 @@ ********************************************************************************/ package org.eclipse.rse.core.internal.subsystems; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.IConnectorService; import org.eclipse.rse.core.subsystems.IServerLauncherProperties; import org.eclipse.rse.internal.model.RSEModelObject; import org.eclipse.rse.model.IPropertySet; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; @@ -101,7 +101,7 @@ public abstract class ServerLauncher extends RSEModelObject implements IServerLa public boolean commit() { - return SystemPlugin.getThePersistenceManager().commit(getConnectorService().getHost()); + return RSEUIPlugin.getThePersistenceManager().commit(getConnectorService().getHost()); } diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/SubSystemConfigurationProxy.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/SubSystemConfigurationProxy.java index 40b71d915db..5a9e4c8775b 100644 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/SubSystemConfigurationProxy.java +++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/internal/subsystems/SubSystemConfigurationProxy.java @@ -25,13 +25,14 @@ import java.util.Vector; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.Platform; import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.subsystems.IConnectorService; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy; import org.eclipse.rse.core.subsystems.SubSystemConfiguration; import org.eclipse.rse.ui.ISystemIconConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.osgi.framework.Bundle; @@ -60,7 +61,7 @@ public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy this.id = element.getAttribute("id"); this.name = element.getAttribute("name").trim(); this.description = element.getAttribute("description").trim(); - this.types = element.getAttribute("systemtypes"); + this.types = element.getAttribute("systemTypes"); this.vendor = element.getAttribute("vendor"); this.category = element.getAttribute("category"); this.systemClassName = element.getAttribute("systemClass"); @@ -70,9 +71,9 @@ public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy if (types == null) types = "*"; this.allTypes = types.equals("*"); this.image = getPluginImage(element, element.getAttribute("icon")); - if (this.image == null) this.image = SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CONNECTION_ID); + if (this.image == null) this.image = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CONNECTION_ID); this.liveImage = getPluginImage(element, element.getAttribute("iconlive")); - if (this.liveImage == null) this.liveImage = SystemPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CONNECTIONLIVE_ID); + if (this.liveImage == null) this.liveImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CONNECTIONLIVE_ID); //createFolderTree(); } /** @@ -111,7 +112,7 @@ public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy if (systemTypes == null) { if (allTypes) - systemTypes = SystemPlugin.getDefault().getSystemTypeNames(true); + systemTypes = RSECorePlugin.getDefault().getRegistry().getSystemTypeNames(); else { StringTokenizer tokens = new StringTokenizer(types,";"); @@ -157,11 +158,10 @@ public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy return image; } /** - * Return true if this extension's systemtypes attribute matches the given system type + * Return true if this extension's systemTypes attribute matches the given system type */ public boolean appliesToSystemType(String type) { - //System.out.println("INSIDE APPLIESTO FOR " + type + ". allTypes = " + allTypes + ". types = " + types); if (allTypes) return true; else @@ -205,7 +205,7 @@ public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy * Return true if this subsystem factory has been instantiated yet. * Use this when you want to avoid the side effect of starting the subsystem factory object. */ - public boolean isSubSystemFactoryActive() + public boolean isSubSystemConfigurationActive() { return (object != null); } @@ -215,7 +215,7 @@ public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy * specified in the class attribute of the extender's xml for the factory extension point. * The object is only instantiated once, and returned on each call to this. */ - public ISubSystemConfiguration getSubSystemFactory() + public ISubSystemConfiguration getSubSystemConfiguration() { if ( firstSubSystemQuery == true && object == null ) { diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractConnectorService.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractConnectorService.java index 9e314802ffa..1c77402b0d2 100644 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractConnectorService.java +++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractConnectorService.java @@ -22,18 +22,20 @@ import java.util.Vector; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.rse.core.ISystemUserIdConstants; import org.eclipse.rse.core.PasswordPersistenceManager; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.internal.model.RSEModelObject; import org.eclipse.rse.model.IHost; import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.model.SystemSignonInformation; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.dialogs.ISignonValidator; import org.eclipse.rse.ui.dialogs.ISystemPasswordPromptDialog; +import org.eclipse.rse.ui.dialogs.SystemChangePasswordDialog; import org.eclipse.rse.ui.dialogs.SystemPasswordPromptDialog; import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.rse.ui.validators.ISystemValidator; +import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; @@ -421,7 +423,7 @@ public abstract class AbstractConnectorService extends RSEModelObject implements if (passwordInformation != null && !forcePrompt) { boolean same = getPrimarySubSystem().getHost().compareUserIds(oldUserId, passwordInformation.getUserid()); - String hostName = getHostName();//SystemPlugin.getQualifiedHostName(getHostName()); + String hostName = getHostName();//RSEUIPlugin.getQualifiedHostName(getHostName()); same = same && hostName.equalsIgnoreCase(passwordInformation.getHostname()); if (!same) { @@ -464,7 +466,7 @@ public abstract class AbstractConnectorService extends RSEModelObject implements // If we had a saved password (in memory or on disk) that was invalid the tell the user if ((passwordInformation == null) && (pwdInvalidFlag == true)) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_INVALID); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PWD_INVALID); msg.makeSubstitution(getLocalUserId(), getHostName()); SystemMessageDialog dialog = new SystemMessageDialog(shell, msg); dialog.open(); @@ -535,7 +537,7 @@ public abstract class AbstractConnectorService extends RSEModelObject implements if (uid != null) { IHost connection = getHost(); - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); ISubSystem[] subsystems = registry.getSubSystems(connection); List uniqueSystems = new ArrayList(); @@ -566,7 +568,7 @@ public abstract class AbstractConnectorService extends RSEModelObject implements protected void updatePasswordForOtherSystemsInConnection(String uid, String password, boolean persistPassword) { IHost connection = getPrimarySubSystem().getHost(); - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); ISubSystem[] subsystems = registry.getSubSystems(connection); List uniqueSystems = new ArrayList(); @@ -617,7 +619,7 @@ public abstract class AbstractConnectorService extends RSEModelObject implements { int whereToUpdate = USERID_LOCATION_CONNECTION; IHost conn = subsystem.getHost(); - ISystemRegistry sr = SystemPlugin.getDefault().getSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(), conn.getHostName(), conn.getDescription(), userId, whereToUpdate); } @@ -1100,6 +1102,74 @@ public abstract class AbstractConnectorService extends RSEModelObject implements public boolean commit() { - return SystemPlugin.getThePersistenceManager().commit(getHost()); + return RSEUIPlugin.getThePersistenceManager().commit(getHost()); + } + + + protected NewPasswordInfo promptForNewPassword(SystemMessage prompt) throws InterruptedException + { + ShowPromptForNewPassword msgAction = new ShowPromptForNewPassword(prompt); + Display.getDefault().syncExec(msgAction); + if (msgAction.isCancelled()) throw new InterruptedException(); + return new NewPasswordInfo(msgAction.getNewPassword(), msgAction.isSavePassword()); + } + + private class ShowPromptForNewPassword implements Runnable + { + private SystemMessage _msg; + private String newPassword; + private boolean savePassword; + private boolean cancelled = false; + + public ShowPromptForNewPassword(SystemMessage msg) + { + _msg = msg; + } + + public void run() + { + SystemChangePasswordDialog dlg = new SystemChangePasswordDialog(RSEUIPlugin.getActiveWorkbenchShell(), getHostName(), getUserId(), _msg); + // Check if password was saved, if so preselect the save checkbox + if (getLocalUserId() != null) + { + dlg.setSavePassword(PasswordPersistenceManager.getInstance().passwordExists(getHostType(), getHostName(), getLocalUserId())); + } + dlg.open(); + if (dlg.wasCancelled()) + { + cancelled = true; + return; + } + newPassword = dlg.getNewPassword(); + savePassword = dlg.getIsSavePassword(); + return; + } + + public boolean isCancelled() + { + return cancelled; + } + + public String getNewPassword() + { + return newPassword; + } + + public boolean isSavePassword() + { + return savePassword; + } + } + + protected class NewPasswordInfo + { + public String newPassword; + public boolean savePassword; + + public NewPasswordInfo(String newPW, boolean savePW) + { + newPassword = newPW; + savePassword = savePW; + } } } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.java index 2cffb0d1825..566c9fe0370 100644 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.java +++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.java @@ -18,10 +18,10 @@ package org.eclipse.rse.core.subsystems; import java.util.Hashtable; import java.util.Set; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.model.DummyHost; import org.eclipse.rse.model.IHost; import org.eclipse.rse.model.ISystemRegistry; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.widgets.Shell; @@ -189,7 +189,7 @@ public abstract class AbstractConnectorServiceManager implements IConnectorServi */ public void updateSubSystems(Shell shell, ISubSystem subsystem, boolean updateUserId, String userId, boolean updatePort, int port) { - ISystemRegistry sr = SystemPlugin.getDefault().getSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); IHost conn = subsystem.getHost(); ISubSystem[] subsystems = sr.getSubSystems(conn); if (subsystems != null) diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IBMServerLauncher.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IBMServerLauncher.java index 36ea9417f38..361bd077cf1 100644 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IBMServerLauncher.java +++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/IBMServerLauncher.java @@ -113,7 +113,7 @@ public class IBMServerLauncher extends ServerLauncher implements IIBMServerLaunc { if (_serverLauncherEnumType == null) { - // for persistance + // for persistence _serverLauncherEnumType = new PropertyType(IPropertyType.TYPE_ENUM); List values = ServerLaunchType.VALUES; String[] enumValues = new String[values.size()]; 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 index a709f25d1cb..392ffdefd55 100644 --- 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 @@ -241,7 +241,7 @@ public interface ISubSystemConfiguration extends ISystemFilterPoolManagerProvide // PROXY METHODS. USED INTERNALLY... // --------------------------------- /** - * Private method called by SystemPlugin + * Private method called by RSEUIPlugin */ public void setSubSystemFactoryProxy(ISubSystemConfigurationProxy proxy); /** @@ -466,7 +466,7 @@ public interface ISubSystemConfiguration extends ISystemFilterPoolManagerProvide public void renameSubSystem(ISubSystem subsystem, String newName); /** * Disconnect all subsystems currently connected. - * Called by shutdown() of SystemPlugin. + * Called by shutdown() of RSEUIPlugin. */ public void disconnectAllSubSystems() throws Exception; 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 index 57396d8cb38..3a912dd46d5 100644 --- 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 @@ -35,12 +35,12 @@ public interface ISubSystemConfigurationProxy public String getDescription(); /** * Return value of the id xml attribute. - * Return unique id of this factory. + * Return unique id of this configuration. */ public String getId(); /** - * Return value of the systemtypes xml attribute. - * Return the system types this subsystem factory supports. + * Return value of the systemTypes xml attribute. + * Return the system types this subsystem configuration supports. */ public String[] getSystemTypes(); /** @@ -50,12 +50,12 @@ public interface ISubSystemConfigurationProxy /** * Return value of the vendor xml attribute. - * Return vendor of this factory. + * Return vendor of this configuration. */ public String getVendor(); /** * Return value of the category xml attribute. - * Return the category this subsystem factory subscribes to. + * Return the category this subsystem configuration subscribes to. * @see org.eclipse.rse.model.ISubSystemFactoryCategories */ public String getCategory(); @@ -73,11 +73,11 @@ public interface ISubSystemConfigurationProxy /** * Return true if the subsystem factory has been instantiated yet */ - public boolean isSubSystemFactoryActive(); + public boolean isSubSystemConfigurationActive(); /** * Return the subsystem factory singleton instance. Will instantiate if not already. */ - public ISubSystemConfiguration getSubSystemFactory(); + 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 @@ -86,8 +86,8 @@ public interface ISubSystemConfigurationProxy public IConnectorService getSystemObject(); /** - * Test if the given system type matches one or more of the types declared in the - * systemtypes attribute of this extension. + * 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); diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java index 9a998845a40..65b8769e474 100644 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java +++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java @@ -30,7 +30,6 @@ import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.SystemPlugin; import org.eclipse.rse.core.SystemPreferencesManager; import org.eclipse.rse.filters.ISystemFilter; import org.eclipse.rse.filters.ISystemFilterPool; @@ -52,6 +51,7 @@ import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.ui.GenericMessages; import org.eclipse.rse.ui.ISystemMessages; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.ui.dialogs.SystemPromptDialog; import org.eclipse.rse.ui.messages.SystemMessageDialog; @@ -200,9 +200,9 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS String excMsg = e.getMessage(); if ((excMsg == null) || (excMsg.length()==0)) excMsg = "Exception " + e.getClass().getName(); - SystemMessage sysMsg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED); + SystemMessage sysMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED); sysMsg.makeSubstitution(getHostName(), excMsg); - return new Status(IStatus.ERROR, SystemPlugin.PLUGIN_ID, IStatus.OK, sysMsg.getLevelOneText(), e); + return new Status(IStatus.ERROR, RSEUIPlugin.PLUGIN_ID, IStatus.OK, sysMsg.getLevelOneText(), e); } return Status.OK_STATUS; @@ -541,13 +541,13 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS else if (e instanceof InterruptedException) { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_CANCELLED); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_CANCELLED); msg.makeSubstitution(getHost().getAliasName()); throw new SystemMessageException(msg); } else { - SystemMessage msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED); + SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED); throw new SystemMessageException(msg); } } @@ -830,7 +830,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS try { ISystemFilterPoolReferenceManager filterMgr = getFilterPoolReferenceManager(); - ISystemRegistry registry = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry(); ISubSystemConfiguration factory = registry.getSubSystemConfiguration(this); int indexOfDot = filterID.indexOf('.'); @@ -1031,7 +1031,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS */ protected void fireEvent(SystemResourceChangeEvent event) { - SystemPlugin.getTheSystemRegistry().fireEvent(event); + RSEUIPlugin.getTheSystemRegistry().fireEvent(event); } /* * Helper method to fire a reference event... @@ -1039,7 +1039,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS protected void fireEvent(SystemResourceChangeEvent event, Object grandParent) { event.setGrandParent(grandParent); - SystemPlugin.getTheSystemRegistry().fireEvent(event); + RSEUIPlugin.getTheSystemRegistry().fireEvent(event); } /* * Helper method to create and then fire an event... @@ -1096,7 +1096,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS //System.out.println(" Back and done!"); // fire model change event in case any BP code is listening... - SystemPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOLREF, newPoolRef, null); + RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOLREF, newPoolRef, null); } catch (Exception exc) { @@ -1121,7 +1121,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS try { getSubSystemConfiguration().saveSubSystem(this); // fire model change event in case any BP code is listening... - SystemPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOLREF, filterPoolRef, null); + RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOLREF, filterPoolRef, null); } catch (Exception exc) { @@ -1137,7 +1137,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS try { getSubSystemConfiguration().saveSubSystem(this); // fire model change event in case any BP code is listening... - SystemPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOLREF, filterPoolRef, null); + RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOLREF, filterPoolRef, null); } catch (Exception exc) { @@ -1155,7 +1155,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS getSubSystemConfiguration().saveSubSystem(this); ISystemFilterPoolReference[] poolRefs = getFilterPoolReferenceManager().getSystemFilterPoolReferences(); for (int idx=0; idx allow empty? No. return userIdValidator; } @@ -888,7 +888,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration */ public void renameSubSystemProfile(ISubSystem ss, String oldProfileName, String newProfileName) { - //SystemPlugin.logDebugMessage(this.getClass().getName(), "Inside renameSubSystemProfile. newProfileName = "+newProfileName+", old ssName = "+ss.getName()); + //RSEUIPlugin.logDebugMessage(this.getClass().getName(), "Inside renameSubSystemProfile. newProfileName = "+newProfileName+", old ssName = "+ss.getName()); //renameFilterPoolManager(getSystemProfile(newProfileName)); // update filter pool manager name ss.renamingProfile(oldProfileName, newProfileName); ISystemFilterPoolReferenceManager sfprm = ss.getSystemFilterPoolReferenceManager(); @@ -1020,7 +1020,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration { // the safest way is to re-use existing method that will restore for every defined connection // in the active profiles (although if user makes another profile active, we'll have to revisit) - IHost[] allActiveConnections = SystemPlugin.getTheSystemRegistry().getHosts(); + IHost[] allActiveConnections = RSEUIPlugin.getTheSystemRegistry().getHosts(); if (allActiveConnections != null) { for (int idx = 0; idx < allActiveConnections.length; idx++) @@ -1064,11 +1064,11 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration boolean subsystemsRestored = subSystemsHaveBeenRestored(conn); if (!subsystemsRestored && force) { - /*FIXME - this should now be triggered by new persistance model + /*FIXME - this should now be triggered by new persistence model try { //System.out.println("SubSystemFactoryImpl.getSubSystems(conn): before restoreSubSystems"); - subsystemArray = SystemPlugin.getThePersistenceManager().restoreSubSystems(this, conn); + subsystemArray = RSEUIPlugin.getThePersistenceManager().restoreSubSystems(this, conn); //System.out.println("After restoreSubSystems: "+subsystemArray.length); if (subsystemArray != null) { @@ -1079,7 +1079,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration } catch (Exception exc) { - SystemPlugin.logError("Exception restoring subsystems for connection " + conn, exc); + RSEUIPlugin.logError("Exception restoring subsystems for connection " + conn, exc); } */ } @@ -1251,7 +1251,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration saveSubSystem(subsys); //DKM - save this event til all the processing is done! // fire model change event in case any BP code is listening... - //SystemPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_SUBSYSTEM, subsys, null); + //RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_SUBSYSTEM, subsys, null); } catch (Exception exc) { @@ -1348,15 +1348,15 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration String poolProfileName = getSystemProfileName(poolMgr); if (poolProfileName.equals(oldSubSystemProfileName)) { - //SystemPlugin.logDebugMessage(this.getClass().getName(),"found reference to copied filter pool " + pool.getName() + ", so changing to reference to new copy"); + //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"found reference to copied filter pool " + pool.getName() + ", so changing to reference to new copy"); ISystemFilterPoolManager newPoolMgr = getFilterPoolManager(newConnection.getSystemProfile()); ISystemFilterPool newPool = newPoolMgr.getSystemFilterPool(pool.getName()); - //SystemPlugin.logDebugMessage(this.getClass().getName(),"...new pool = " + newPoolMgr.getName()+"."+newPool.getName()); + //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"...new pool = " + newPoolMgr.getName()+"."+newPool.getName()); newRefMgr.addReferenceToSystemFilterPool(newPool); } else { - //SystemPlugin.logDebugMessage(this.getClass().getName(),"found reference to filter pool from another profile " + poolProfileName+"."+pool.getName() + ", so not changing to reference to new copy"); + //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"found reference to filter pool from another profile " + poolProfileName+"."+pool.getName() + ", so not changing to reference to new copy"); newRefMgr.addReferenceToSystemFilterPool(pool); } } @@ -1369,7 +1369,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration saveSubSystem(subsys); // fire model change event in case any BP code is listening... - SystemPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_SUBSYSTEM, subsys, null); + RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_SUBSYSTEM, subsys, null); } catch (Exception exc) { @@ -1538,7 +1538,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration fireEvent(subsystem, ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE, subsystem.getHost()); // fire model change event in case any BP code is listening... - SystemPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_SUBSYSTEM, subsystem, null); + RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_SUBSYSTEM, subsystem, null); // if the updated subsystem is one of many that share a single ISystem, then // update all of them too... @@ -1647,7 +1647,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration } // fire model change event in case any BP code is listening... - SystemPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_SUBSYSTEM, subsystem, null); + RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_SUBSYSTEM, subsystem, null); return true; } @@ -1721,7 +1721,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration { boolean anyAdded = false; SystemFilterPoolWrapperInformation poolWrapperInfo = getNewFilterWizardPoolWrapperInformation(); - ISystemProfile[] activeProfiles = SystemPlugin.getTheSystemRegistry().getActiveSystemProfiles(); + ISystemProfile[] activeProfiles = RSEUIPlugin.getTheSystemRegistry().getActiveSystemProfiles(); ISystemProfile activeProfile = selectedSubSystem.getHost().getSystemProfile(); for (int idx = 0; idx < activeProfiles.length; idx++) { @@ -1749,7 +1749,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration /** * Disconnect all subsystems currently connected. - * Called by shutdown() of SystemPlugin. + * Called by shutdown() of RSEUIPlugin. */ public void disconnectAllSubSystems() throws Exception { @@ -1824,7 +1824,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration pool = mgr.getSystemFilterPool(defaultPoolName); } */ - //SystemPlugin.logDebugMessage(this.getClass().getName(), "...inside getDefaultFilterPool for "+subsys.getName()+", default pool="+pool); + //RSEUIPlugin.logDebugMessage(this.getClass().getName(), "...inside getDefaultFilterPool for "+subsys.getName()+", default pool="+pool); return pool; } /** @@ -1868,7 +1868,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration */ public ISystemFilterPoolManager[] getActiveFilterPoolManagers() { - ISystemProfile[] activeProfiles = SystemPlugin.getTheSystemRegistry().getActiveSystemProfiles(); + ISystemProfile[] activeProfiles = RSEUIPlugin.getTheSystemRegistry().getActiveSystemProfiles(); ISystemFilterPoolManager[] activeManagers = new ISystemFilterPoolManager[activeProfiles.length]; for (int idx = 0; idx < activeProfiles.length; idx++) { @@ -1890,7 +1890,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration { try { - mgr = SystemFilterPoolManager.createSystemFilterPoolManager(profile, SystemPlugin.getDefault().getLogger(), this, // the caller + mgr = SystemFilterPoolManager.createSystemFilterPoolManager(profile, RSEUIPlugin.getDefault().getLogger(), this, // the caller getFilterPoolManagerName(profile), // the filter pool manager name supportsNestedFilters(), // whether or not nested filters are allowed ISystemFilterSavePolicies.SAVE_POLICY_ONE_FILE_PER_FILTER, filterNamingPolicy); @@ -1922,7 +1922,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration defaultPool.setDefault(true); try { - SystemPlugin.getThePersistenceManager().commit(defaultPool); + RSEUIPlugin.getThePersistenceManager().commit(defaultPool); } catch (Exception exc) { @@ -1977,7 +1977,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration ISystemFilterPoolManager oldMgr = getFilterPoolManager(oldProfile); // will restore it if necessary - ISystemFilterPoolManager mgr = SystemFilterPoolManager.createSystemFilterPoolManager(newProfile, SystemPlugin.getDefault().getLogger(), this, // the caller + ISystemFilterPoolManager mgr = SystemFilterPoolManager.createSystemFilterPoolManager(newProfile, RSEUIPlugin.getDefault().getLogger(), this, // the caller getFilterPoolManagerName(newProfile), // the filter pool manager name supportsNestedFilters(), // whether or not nested filters are allowed ISystemFilterSavePolicies.SAVE_POLICY_ONE_FILE_PER_FILTER, filterNamingPolicy); @@ -2035,7 +2035,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration public ISystemFilterPool getSystemFilterPoolForBrokenReference(ISystemFilterPoolReferenceManager callingRefMgr, String missingPoolMgrName, String missingPoolName) { ISystemFilterPool match = null; - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); ISystemProfile profile = sr.getSystemProfile(missingPoolMgrName); if (profile != null) { @@ -2052,7 +2052,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration { IHost conn = ss.getHost(); String connectionName = conn.getSystemProfileName() + "." + conn.getAliasName(); - SystemMessage sysMsg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_LOADING_PROFILE_SHOULDBE_ACTIVATED); + SystemMessage sysMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_LOADING_PROFILE_SHOULDBE_ACTIVATED); sysMsg.makeSubstitution(missingPoolMgrName, connectionName); SystemBasePlugin.logWarning(sysMsg.getFullMessageID() + ": " + sysMsg.getLevelOneText()); if (brokenReferenceWarningsIssued.get(missingPoolMgrName) == null) @@ -2154,7 +2154,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration */ protected void fireEvent(SystemResourceChangeEvent event) { - SystemPlugin.getTheSystemRegistry().fireEvent(event); + RSEUIPlugin.getTheSystemRegistry().fireEvent(event); } /** * Helper method to create and then fire an event... @@ -2343,7 +2343,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration //fireEvent(newPool, EVENT_ADD, this); // hmm, might not need to do this since we only work on references? // fire model change event in case any BP code is listening... - SystemPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOL, newPool, null); + RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOL, newPool, null); } /** * A filter pool has been deleted @@ -2353,7 +2353,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration //fireEvent(oldPool, EVENT_DELETE, this); currently called by SystemView's delete support // fire model change event in case any BP code is listening... - SystemPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOL, oldPool, null); + RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOL, oldPool, null); } /** * A filter pool has been renamed @@ -2363,7 +2363,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration //fireEvent(pool, EVENT_RENAME, this); subsystem handles in firing of reference rename // fire model change event in case any BP code is listening... - SystemPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_RENAMED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOL, pool, oldName); + RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_RENAMED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTERPOOL, pool, oldName); } /** * One or more filter pools have been re-ordered within their manager @@ -2375,7 +2375,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration // fire model change event in case any BP code is listening... if (pools!=null) for (int idx=0; idx0)) - SystemPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTER, filterStrings[0].getParentSystemFilter(), null); + RSEUIPlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_FILTER, filterStrings[0].getParentSystemFilter(), null); } // --------------------------------- @@ -2671,13 +2671,13 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration IIBMServerLauncher sl = new IBMServerLauncher("IBM Server Launcher", connectorService); String systemType = connectorService.getHostType(); - if (systemType.equals(ISystemTypes.SYSTEMTYPE_LINUX) || - systemType.equals(ISystemTypes.SYSTEMTYPE_POWER_LINUX) || - systemType.equals(ISystemTypes.SYSTEMTYPE_ZSERIES_LINUX)) { + if (systemType.equals(IRSESystemType.SYSTEMTYPE_LINUX) || + systemType.equals(IRSESystemType.SYSTEMTYPE_POWER_LINUX) || + systemType.equals(IRSESystemType.SYSTEMTYPE_ZSERIES_LINUX)) { sl.setServerScript(IBMServerLauncherConstants.LINUX_REXEC_SCRIPT); } - else if (systemType.equals(ISystemTypes.SYSTEMTYPE_UNIX) || - systemType.equals(ISystemTypes.SYSTEMTYPE_AIX)) { + else if (systemType.equals(IRSESystemType.SYSTEMTYPE_UNIX) || + systemType.equals(IRSESystemType.SYSTEMTYPE_AIX)) { sl.setServerScript(IBMServerLauncherConstants.UNIX_REXEC_SCRIPT); } @@ -2930,12 +2930,12 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration SystemMessage msg = null; if (port > 0) { - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONNECTWITHPORT_PROGRESS); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECTWITHPORT_PROGRESS); msg.makeSubstitution(hostName, Integer.toString(port)); } else { - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_PROGRESS); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_PROGRESS); msg.makeSubstitution(hostName); } return msg.getLevelOneText(); @@ -2948,12 +2948,12 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration SystemMessage msg = null; if (port > 0) { - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECTWITHPORT_PROGRESS); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECTWITHPORT_PROGRESS); msg.makeSubstitution(hostName, Integer.toString(port)); } else { - msg = SystemPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECT_PROGRESS); + msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECT_PROGRESS); msg.makeSubstitution(hostName); } return msg.getLevelOneText(); diff --git a/rse/plugins/org.eclipse.rse.ui/systemmessages.xml b/rse/plugins/org.eclipse.rse.ui/systemmessages.xml index c0d835e7bf0..3e24cc6f666 100644 --- a/rse/plugins/org.eclipse.rse.ui/systemmessages.xml +++ b/rse/plugins/org.eclipse.rse.ui/systemmessages.xml @@ -749,6 +749,10 @@ Contributors: Uploading resources... + + The new password is invalid. + The remote system indicated that the new password is unacceptable. Please ensure the new password follows all password rules for the remote system. + @@ -1348,6 +1352,15 @@ Contributors: Initializing Remote Systems Explorer host server + + Communication with the remote system %1 has been secured using SSL. Continue? + + + + Connection %1 has not been secured using SSL. Proceed anyways? + + + The connection %1 is currently offline and cannot be connected. You have performed an action which requires a live connection to the remote system. Switch the connection to online and perform the action again. To switch the connection online, right click on the connection %1 and select the Work Offline action. diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/ISystemViewSupplier.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/ISystemViewSupplier.java index c07de0b57c3..c8278d0386a 100644 --- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/ISystemViewSupplier.java +++ b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/ISystemViewSupplier.java @@ -18,7 +18,7 @@ package org.eclipse.rse.core; /** * You own views launchable from the Remote Systems Explorer. You must register yourself - * with SystemPlugin via the registerViewSupplier method. + * with RSEUIPlugin via the registerViewSupplier method. */ public interface ISystemViewSupplier { 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 9a69402e7ad..33697fc1de7 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 @@ -33,6 +33,7 @@ import org.eclipse.core.runtime.Platform; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.rse.model.SystemSignonInformation; import org.eclipse.rse.ui.ISystemPreferencesConstants; +import org.eclipse.rse.ui.RSEUIPlugin; /** @@ -213,7 +214,7 @@ public class PasswordPersistenceManager { */ public void remove(String systemtype, String hname, String userid) { - String hostname = hname;//SystemPlugin.getQualifiedHostName(hname); + String hostname = hname;//RSEUIPlugin.getQualifiedHostName(hname); // Convert userid to upper case if required if (!isUserIDCaseSensitive(systemtype)) { @@ -262,7 +263,7 @@ public class PasswordPersistenceManager { */ public boolean passwordExists(String systemtype, String hname, String userid, boolean checkDefault) { - String hostname = hname;//SystemPlugin.getQualifiedHostName(hname); + String hostname = hname;//RSEUIPlugin.getQualifiedHostName(hname); return (find(systemtype, hostname, userid) != null); } @@ -470,8 +471,8 @@ public class PasswordPersistenceManager { // uid matches, check if hosts are the same if (khostname.startsWith(phostname) || phostname.startsWith(khostname)) { - String qkhost = SystemPlugin.getQualifiedHostName(khostname); - String qphost = SystemPlugin.getQualifiedHostName(phostname); + String qkhost = RSEUIPlugin.getQualifiedHostName(khostname); + String qphost = RSEUIPlugin.getQualifiedHostName(phostname); if (qkhost.equals(qphost)) { password = (String)passwords.get(key); @@ -520,8 +521,8 @@ public class PasswordPersistenceManager { // uid matches, check if hosts are the same if (khostname.startsWith(phostname) || phostname.startsWith(khostname)) { - String qkhost = SystemPlugin.getQualifiedHostName(khostname); - String qphost = SystemPlugin.getQualifiedHostName(phostname); + String qkhost = RSEUIPlugin.getQualifiedHostName(khostname); + String qphost = RSEUIPlugin.getQualifiedHostName(phostname); if (qkhost.equals(qphost)) { password = (String)passwords.get(key); @@ -547,7 +548,7 @@ public class PasswordPersistenceManager { */ public SystemSignonInformation find(String systemtype, String hname, String userid, boolean checkDefault) { - String hostname = hname;//SystemPlugin.getQualifiedHostName(hname); + String hostname = hname;//RSEUIPlugin.getQualifiedHostName(hname); // Convert userid to upper case if required if (!isUserIDCaseSensitive(systemtype)) { @@ -581,7 +582,7 @@ public class PasswordPersistenceManager { */ private String getPasswordKey(String hname, String userid) { - String hostname = hname;//SystemPlugin.getQualifiedHostName(hname); + String hostname = hname;//RSEUIPlugin.getQualifiedHostName(hname); StringBuffer buffer = new StringBuffer(hostname); buffer.append("//"); buffer.append(userid); @@ -607,7 +608,7 @@ public class PasswordPersistenceManager { { if (DEFAULT_SYSTEM_TYPE.equals(systemType)) { - IPreferenceStore store = SystemPlugin.getDefault().getPreferenceStore(); + IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore(); systemType = store.getString(ISystemPreferencesConstants.SYSTEMTYPE); } diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemAdapterHelpers.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemAdapterHelpers.java index 50b0c269f1a..a4b4751d5b8 100644 --- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemAdapterHelpers.java +++ b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemAdapterHelpers.java @@ -19,6 +19,7 @@ package org.eclipse.rse.core; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.Platform; import org.eclipse.jface.viewers.Viewer; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; import org.eclipse.rse.ui.view.ISystemViewElementAdapter; import org.eclipse.rse.ui.view.ISystemViewInputProvider; @@ -107,7 +108,7 @@ public class SystemAdapterHelpers */ public SystemViewAdapterFactory getSystemViewAdapterFactory() { - return SystemPlugin.getDefault().getSystemViewAdapterFactory(); + return RSEUIPlugin.getDefault().getSystemViewAdapterFactory(); } } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemBasePlugin.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemBasePlugin.java index 93e59cb1c55..e4285125434 100644 --- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemBasePlugin.java +++ b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemBasePlugin.java @@ -38,6 +38,7 @@ import org.eclipse.rse.logging.Logger; import org.eclipse.rse.logging.LoggerFactory; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessageFile; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.messages.SystemUIMessageFile; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Display; @@ -393,22 +394,34 @@ public abstract class SystemBasePlugin extends AbstractUIPlugin { String iconPath = "icons/full/"; //$NON-NLS-1$ String key = iconPath + relativePath; - ImageDescriptor image = (ImageDescriptor)imageDescriptorRegistry.get(key); - - if (image != null) - return image; - - try { - Bundle bundle = Platform.getBundle(PlatformUI.PLUGIN_ID); - URL installURL = bundle.getEntry("/"); - URL url = new URL(installURL, key); - image = ImageDescriptor.createFromURL(url); - imageDescriptorRegistry.put(key, image); - return image; - } catch (MalformedURLException e) { - // should not happen - return ImageDescriptor.getMissingImageDescriptor(); + ImageDescriptor descriptor = (ImageDescriptor)imageDescriptorRegistry.get(key); + if (descriptor == null) { + String[] bundleNames = new String[] {"org.eclipse.ui", "org.eclipse.ui.ide"}; + for (int i = 0; (i < bundleNames.length) && (descriptor == null); i++) { + String bundleName = bundleNames[i]; + Bundle bundle = Platform.getBundle(bundleName); + URL url = bundle.getResource(key); + if (url != null) { + descriptor = ImageDescriptor.createFromURL(url); + } + } + if (descriptor == null) { + descriptor = ImageDescriptor.getMissingImageDescriptor(); + } + imageDescriptorRegistry.put(key, descriptor); } + return descriptor; +// try { +// Bundle bundle = Platform.getBundle(PlatformUI.PLUGIN_ID); +// URL installURL = bundle.getEntry("/"); +// URL url = new URL(installURL, key); +// image = ImageDescriptor.createFromURL(url); +// imageDescriptorRegistry.put(key, image); +// return image; +// } catch (MalformedURLException e) { +// // should not happen +// return ImageDescriptor.getMissingImageDescriptor(); +// } } // ---------------------------------------- @@ -671,7 +684,7 @@ public abstract class SystemBasePlugin extends AbstractUIPlugin if (url!=null) { url = Platform.resolve(url); - URL temp = Platform.getBundle(SystemPlugin.PLUGIN_ID).getEntry("/"); + URL temp = Platform.getBundle(RSEUIPlugin.PLUGIN_ID).getEntry("/"); temp = Platform.resolve(temp); url = Platform.resolve(url); mf = new SystemUIMessageFile(url.getPath(), temp.getFile()); diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPopupMenuActionContributor.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPopupMenuActionContributor.java index 3c74f83ac35..316bbd9f4f8 100644 --- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPopupMenuActionContributor.java +++ b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPopupMenuActionContributor.java @@ -76,7 +76,7 @@ public class SystemPopupMenuActionContributor extends PluginActionBuilder implem private static final String ATT_SUBSUBTYPE_FILTER = "subsubtypefilter"; //$NON-NLS-1$ private static final String ATT_SUBSYSTEM_FACTORY_ID = "subsystemconfigurationid"; //$NON-NLS-1$ private static final String ATT_SUBSYSTEM_FACTORY_CATEGORY = "subsystemconfigurationCategory"; //$NON-NLS-1$ - private static final String ATT_SYSTEM_TYPES = "systemtypes"; //$NON-NLS-1$ + private static final String ATT_SYSTEM_TYPES = "systemTypes"; //$NON-NLS-1$ private static final String ATT_ID = "id"; //$NON-NLS-1$ private static final String ATT_NAME = "name"; //$NON-NLS-1$ private static final String ATT_LABEL = "label"; //$NON-NLS-1$ @@ -165,7 +165,7 @@ public class SystemPopupMenuActionContributor extends PluginActionBuilder implem } /** - * Return what was specified for the systemtypes xml attribute. + * Return what was specified for the systemTypes xml attribute. */ public String getSystemTypesFilter() { return matcher.getSystemTypesFilter(); 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 644e3b57f0c..2819f3a7eb2 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 @@ -22,6 +22,7 @@ import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.rse.model.IHost; import org.eclipse.rse.model.ISystemRegistry; import org.eclipse.rse.ui.ISystemPreferencesConstants; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.propertypages.RemoteSystemsPreferencePage; @@ -201,7 +202,7 @@ public class SystemPreferencesManager */ public void setConnectionNamesOrder() { - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); IHost[] conns = sr.getHosts(); String[] names = new String[conns.length]; for (int idx=0; idxclass. The class which implements IWorkbenchPropertyPage *
  • subsystemconfigurationid. For scoping to remote objects for a given subsystem factory *
  • subsystemconfigurationCategory. For scoping to remote objects for a given subsystem factory category - *
  • systemtypes. For scoping to remote objects from systems of a given type, or comma-separated types. + *
  • systemTypes. For scoping to remote objects from systems of a given type, or semicolon-separated types. *
  • namefilter. For scoping to remote objects of a given name *
  • typecategoryfilter. For scoping to remote objects for a given remote object type category *
  • typefilter. For scoping to remote objects of a given type @@ -87,7 +87,7 @@ public class SystemPropertyPageExtension implements IPropertyPageContributor subsubtypefilter = element.getAttribute("subsubtypefilter"); subsystemfilter = element.getAttribute("subsystemconfigurationid"); subsystemCategoryFilter = element.getAttribute("subsystemconfigurationCategory"); - systypes = element.getAttribute("systemtypes"); + systypes = element.getAttribute("systemTypes"); filterProperties = null; IConfigurationElement[] children = element.getChildren(); @@ -214,7 +214,7 @@ public class SystemPropertyPageExtension implements IPropertyPageContributor } /** * Getter method. - * Return what was specified for the systemtypes xml attribute. + * Return what was specified for the systemTypes xml attribute. */ public String getSystemTypesFilter() { @@ -329,7 +329,7 @@ public class SystemPropertyPageExtension implements IPropertyPageContributor * property page manager. * @return true if pages were added, false if not. */ - public boolean contributePropertyPages(PropertyPageManager manager, IAdaptable object) + public boolean contributePropertyPages(PropertyPageManager manager, Object object) { boolean added = false; SystemRemotePropertyPageNode node = new SystemRemotePropertyPageNode(this, object); @@ -347,12 +347,15 @@ public class SystemPropertyPageExtension implements IPropertyPageContributor /** * Creates the page based on the information in the configuration element. */ - public IWorkbenchPropertyPage createPage(IAdaptable element) // throws CoreException + public IWorkbenchPropertyPage createPage(Object element) // throws CoreException { IWorkbenchPropertyPage ppage = getPropertyPage(); if (ppage != null) { - ppage.setElement(element); + if (element instanceof IAdaptable) { + ppage.setElement((IAdaptable)element); + } + ppage.setTitle(name); } return ppage; diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPropertyPageExtensionManager.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPropertyPageExtensionManager.java index 5f0130a216f..e8d87164322 100644 --- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPropertyPageExtensionManager.java +++ b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemPropertyPageExtensionManager.java @@ -16,6 +16,7 @@ package org.eclipse.rse.core; import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; import org.eclipse.ui.internal.dialogs.PropertyPageManager; @@ -52,7 +53,7 @@ public class SystemPropertyPageExtensionManager { if (propertyPageSuppliers == null) { - propertyPageSuppliers = SystemPlugin.getDefault().getPropertyPageExtensions(); + propertyPageSuppliers = RSEUIPlugin.getDefault().getPropertyPageExtensions(); } return propertyPageSuppliers; } 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 b4d41ed96fc..19dc77434fe 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 @@ -29,7 +29,7 @@ import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; *
      *
    1. subsystemconfigurationid. For scoping to remote objects for a given subsystem factory *
    2. subsystemconfigurationCategory. For scoping to remote objects for a given subsystem factory category. - *
    3. systemtypes. For scoping to remote objects from systems of a given type, or comma-separated types. + *
    4. systemTypes. For scoping to remote objects from systems of a given type, or semicolon-separated types. *
    5. category. For scoping to remote objects of a given type category *
    6. namefilter. For scoping to remote objects of a given name *
    7. typefilter. For scoping to remote objects of a given type @@ -83,7 +83,7 @@ public class SystemRemoteObjectMatcher private boolean genericSubSystemEnd = false; /** - * Historical constructor that doesn't support "subsystemFactoryCategory" or "systemtypes". + * Historical constructor that doesn't support "subsystemFactoryCategory" or "systemTypes". */ public SystemRemoteObjectMatcher(String subsystemFactoryId, String categoryFilter, String nameFilter, String typeFilter, @@ -92,7 +92,7 @@ public class SystemRemoteObjectMatcher this(subsystemFactoryId, null, categoryFilter, null, nameFilter, typeFilter, subtypeFilter, subsubtypeFilter); } /** - * Constructor that supports "subsystemFactoryCategory" and "systemtypes". + * Constructor that supports "subsystemFactoryCategory" and "systemTypes". */ public SystemRemoteObjectMatcher(String subsystemFactoryId, String subsystemFactoryCategoryFilter, String categoryFilter, String systemTypes, String nameFilter, String typeFilter, @@ -302,7 +302,7 @@ public class SystemRemoteObjectMatcher } /** * Getter method. - * Return what was specified for the systemtypes xml attribute. + * Return what was specified for the systemTypes xml attribute. */ public String getSystemTypesFilter() { diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceHelpers.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceHelpers.java index ed565eb562c..0078781e9af 100644 --- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceHelpers.java +++ b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemResourceHelpers.java @@ -188,7 +188,7 @@ public class SystemResourceHelpers implements FileFilter String msg = "Someone asked to create Private folder!"; Exception e = new Exception(msg); e.fillInStackTrace(); - SystemPlugin.logError(msg, e); + RSEUIPlugin.logError(msg, e); } */ boolean ok = true; @@ -260,7 +260,7 @@ public class SystemResourceHelpers implements FileFilter String msg = "Someone asked to create Private folder!"; Exception e = new Exception(msg); e.fillInStackTrace(); - SystemPlugin.logError(msg, e); + RSEUIPlugin.logError(msg, e); } */ } catch (CoreException e) 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 120ec8e9a76..cf848fcc9af 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 @@ -26,6 +26,7 @@ import org.eclipse.core.resources.IWorkspace; import org.eclipse.rse.internal.model.SystemModelChangeEvent; import org.eclipse.rse.model.ISystemModelChangeEvents; import org.eclipse.rse.model.ISystemRegistry; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.view.SystemPerspectiveLayout; import org.eclipse.rse.ui.view.SystemView; import org.eclipse.rse.ui.view.SystemViewPart; @@ -238,12 +239,12 @@ public class SystemResourceListener implements IResourceChangeListener, Runnable } } //else - // SystemPlugin.logWarning("IN RESOURCeListener, RESOURCE AND PROJECT ARE NULL, UNABLE TO FILTER THE EVENT"); + // RSEUIPlugin.logWarning("IN RESOURCeListener, RESOURCE AND PROJECT ARE NULL, UNABLE TO FILTER THE EVENT"); } else { //if (resource == null) - // SystemPlugin.logWarning("IN RESOURCeListener, RESOURCE IS NULL, UNABLE TO FILTER THE EVENT"); + // RSEUIPlugin.logWarning("IN RESOURCeListener, RESOURCE IS NULL, UNABLE TO FILTER THE EVENT"); } if (delta != null) @@ -274,7 +275,7 @@ public class SystemResourceListener implements IResourceChangeListener, Runnable String sType = getTypeString(type); if (!fullDebug) SystemBasePlugin.logInfo("RESOURCE CHANGED EVENT: eventType=" + sType + ", eventSource=" + source); - //SystemPlugin.logInfo("RESOURCE DELTA:"); //$NON-NLS-1$ + //RSEUIPlugin.logInfo("RESOURCE DELTA:"); //$NON-NLS-1$ } boolean ignored = false; if (delta != null) @@ -580,7 +581,7 @@ public class SystemResourceListener implements IResourceChangeListener, Runnable { return SystemPerspectiveHelpers.findRSEView(); /* - SystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + SystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); IWorkbench wb = PlatformUI.getWorkbench(); IWorkbenchWindow[] wbWindows = wb.getWorkbenchWindows(); for (int idx = 0; idx < wbWindows.length; idx++) @@ -605,7 +606,7 @@ public class SystemResourceListener implements IResourceChangeListener, Runnable */ private IWorkbenchPage[] getRSEPerspectives() { - ISystemRegistry sr = SystemPlugin.getTheSystemRegistry(); + ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); IWorkbench wb = PlatformUI.getWorkbench(); IWorkbenchWindow[] wbWindows = wb.getWorkbenchWindows(); Vector v = new Vector(); @@ -661,7 +662,7 @@ public class SystemResourceListener implements IResourceChangeListener, Runnable } else if (runAction == RSE_RESTART) { - SystemPlugin.getDefault().restart(); + RSEUIPlugin.getDefault().restart(); } else if (runAction == OPEN_VIEWS) { @@ -669,7 +670,7 @@ public class SystemResourceListener implements IResourceChangeListener, Runnable } else if (runAction == FIRE_EVENT) { - SystemPlugin.getTheSystemRegistry().fireEvent( + 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 c4e7e1a593f..84b3f2b1477 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 @@ -518,7 +518,7 @@ public class SystemResourceManager implements SystemResourceConstants if (helpers == null) { helpers = SystemResourceHelpers.getResourceHelpers(); - //helpers.setLogFile(SystemPlugin.getDefault().getLogFile()); + //helpers.setLogFile(RSEUIPlugin.getDefault().getLogFile()); } return helpers; } diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemType.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemType.java deleted file mode 100644 index 3fafb44f4c6..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemType.java +++ /dev/null @@ -1,199 +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; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.rse.ui.propertypages.SystemTypeFieldEditor; - - -/** - * Represents a registered system type, as registered by the systemtype extension point. - * Currently, only two pieces of information per type is recorded:
      - *
        - *
      1. name. eg "Windows" - *
      2. image. eg "windows.gif" - *
      - */ -public class SystemType -{ - - private String name, description; - private ImageDescriptor image, connectedImage; - private boolean enabled=true; - private String userId; - - // yantzi: artemis 6.0 added offline attribute and extension point attribute to enable offline support - private boolean enableOffline; - - /** - * Constructor - * @param name - display name for this system type - * @param image - image for this system type, not connected - * @param connectedImage - image for this system type, when connected - * @param enableOffline - whether to enable offline - * @param description - translatable description of the system type - */ - public SystemType(String name, ImageDescriptor image, ImageDescriptor connectedImage, boolean enableOffline, - String description) - { - this.name = name; - this.description = description; - this.image = image; - this.connectedImage = connectedImage; - this.enableOffline = enableOffline; - } - - /** - * Convert to a string. Same as {@link #getName()} - */ - public String toString() - { - return name; - } - - /** - * Return the display name for this system type - * @return the name shown in the New Connection wizard for this system type. - */ - public String getName() - { - return name; - } - - /** - * Return the translatable description of this system type - * @return a description of this system type. Might be null. - */ - public String getDescription() - { - return description; - } - - /** - * Return true if this system type supports offline mode or not - * @return true if this system type supports offline mode - */ - public boolean isEnableOffline() - { - return enableOffline; - } - - /** - * Configuration method. - * Set whether this system type supports offline mode or not. - */ - public void setEnableOffline(boolean enable) - { - enableOffline = enable; - } - - /** - * Return true if this system type is currently enabled, meaning it shows - * up in the New Connection wizard. User can affect this via preferences page. - * @return true if this type is enabled - */ - public boolean isEnabled() - { - return enabled; - } - - /** - * Specify if this system type is currently enabled, affecting if it shows up in - * the New Connection wizard. User can affect this via preferences page. - */ - public void setEnabled(boolean enabled) - { - this.enabled = enabled; - } - - /** - * Return the image for connections of this system type, when not connected - */ - public ImageDescriptor getImage() - { - return image; - } - - /** - * Return the image for connections of this system type, when connected - */ - public ImageDescriptor getConnectedImage() - { - if (connectedImage == null) - return image; - else - return connectedImage; - } - - /** - * Return the default user ID preferences setting for this system type. - */ - public String getDefaultUserID() - { - return userId; - } - - /** - * Set the default user ID for this system type. This is a preferences value - */ - public void setDefaultUserID(String id) - { - this.userId = id; - } - - /** - * Compare this system type to another one. Compare by name. - */ - public boolean equals(Object o) - { - if (o instanceof String) - return ((String)o).equals(name); - else if (o instanceof SystemType) - return ((SystemType)o).getName().equals(name); - else - return false; - } - - /** - * Hash by name - */ - public int hashCode() - { - return name.hashCode(); - } - - /** - * Helper method... given a system type name, return its system type object - */ - public static SystemType getSystemType(SystemType[] allTypes, String name) - { - SystemType type = null; - for (int idx=0; (type==null)&&(idx